public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/21161] "clobbered by longjmp" warning ignores the data flow
       [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-11 13:06 ` rguenth at gcc dot gnu.org
  2012-09-29 22:25 ` tg at mirbsd dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-11 13:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Target|powerpc-*                   |powerpc-*-*, x86_64-*-*
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-11
     Ever Confirmed|0                           |1
      Known to fail|                            |4.6.3
           Severity|normal                      |enhancement

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-11 13:06:21 UTC ---
Confirmed.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/21161] "clobbered by longjmp" warning ignores the data flow
       [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
  2012-01-11 13:06 ` [Bug middle-end/21161] "clobbered by longjmp" warning ignores the data flow rguenth at gcc dot gnu.org
@ 2012-09-29 22:25 ` tg at mirbsd dot org
  2021-05-14  9:45 ` [Bug middle-end/21161] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: tg at mirbsd dot org @ 2012-09-29 22:25 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Thorsten Glaser <tg at mirbsd dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tg at mirbsd dot org

--- Comment #4 from Thorsten Glaser <tg at mirbsd dot org> 2012-09-29 22:25:14 UTC ---
Confirmed, happens in mksh now (but not with 4.6 or 4.7), reduced testcase:

tg@zigo:~/b/mksh-40.9.20120630 $ /usr/lib/gcc-snapshot/bin/gcc --version        
gcc (Debian 20120915-1) 4.8.0 20120915 (experimental) [trunk revision 191353]
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

tg@zigo:~/b/mksh-40.9.20120630 $ /usr/lib/gcc-snapshot/bin/gcc -O2 -Wextra -c
t.c                               
t.c: In function 'hereinval':
t.c:12:27: warning: argument 'content' might be clobbered by 'longjmp' or
'vfork' [-Wclobbered]
 int hereinval(const char *content, int sub, char **resbuf) {
                           ^
tg@zigo:~/b/mksh-40.9.20120630 $ cat t.c
#include <setjmp.h>
#include <string.h>
struct source {
        int foo;
        const char *str;
} *source = NULL;
jmp_buf jb;
extern char *evalstr(void);
extern struct source *pushs(void);
extern void newenv(void);
extern void quitenv(void);
int hereinval(const char *content, int sub, char **resbuf) {
        const char *ccp;
        struct source *s, *osource;

        osource = source;
        newenv();
        if (setjmp(jb)) {
                source = osource;
                quitenv();
                return (-2);
        }
        if (sub) {
                s = pushs();
                s->str = content;
                source = s;
                /* ... */
                ccp = evalstr();
                source = osource;
        } else
                ccp = content;

        *resbuf = strdup(ccp);
        return (0);
}


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/21161] [9/10/11/12 Regression] "clobbered by longjmp" warning ignores the data flow
       [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
  2012-01-11 13:06 ` [Bug middle-end/21161] "clobbered by longjmp" warning ignores the data flow rguenth at gcc dot gnu.org
  2012-09-29 22:25 ` tg at mirbsd dot org
@ 2021-05-14  9:45 ` jakub at gcc dot gnu.org
  2021-06-01  8:03 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/21161] [9/10/11/12 Regression] "clobbered by longjmp" warning ignores the data flow
       [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-05-14  9:45 ` [Bug middle-end/21161] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
@ 2021-06-01  8:03 ` rguenth at gcc dot gnu.org
  2022-05-27  9:33 ` [Bug middle-end/21161] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #22 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/21161] [10/11/12/13 Regression] "clobbered by longjmp" warning ignores the data flow
       [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-06-01  8:03 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:33 ` rguenth at gcc dot gnu.org
  2022-06-28 10:28 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #23 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/21161] [10/11/12/13 Regression] "clobbered by longjmp" warning ignores the data flow
       [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-05-27  9:33 ` [Bug middle-end/21161] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:28 ` jakub at gcc dot gnu.org
  2023-03-23 19:44 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #24 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/21161] [10/11/12/13 Regression] "clobbered by longjmp" warning ignores the data flow
       [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-06-28 10:28 ` jakub at gcc dot gnu.org
@ 2023-03-23 19:44 ` pinskia at gcc dot gnu.org
  2023-05-19 22:19 ` [Bug middle-end/21161] [10/11/12/13/14 " eggert at cs dot ucla.edu
  2023-07-07 10:28 ` [Bug middle-end/21161] [11/12/13/14 " rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-23 19:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

--- Comment #25 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Peter Bergner from comment #14)

For the testcase in comment #14, we don't get a warning since GCC 7 but the
original testcase we still get a warning on the trunk.
I have not looked into why though.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/21161] [10/11/12/13/14 Regression] "clobbered by longjmp" warning ignores the data flow
       [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2023-03-23 19:44 ` pinskia at gcc dot gnu.org
@ 2023-05-19 22:19 ` eggert at cs dot ucla.edu
  2023-07-07 10:28 ` [Bug middle-end/21161] [11/12/13/14 " rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: eggert at cs dot ucla.edu @ 2023-05-19 22:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Paul Eggert <eggert at cs dot ucla.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eggert at cs dot ucla.edu

--- Comment #26 from Paul Eggert <eggert at cs dot ucla.edu> ---
Created attachment 55122
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55122&action=edit
GCC bug 21161 as triggered by GNU diffutils

I ran into a similar problem when compiling GNU diffutils with gcc (GCC) 13.1.1
20230511 (Red Hat 13.1.1-2) on x86.64. Here is a stripped-down illustrating of
the diffutils problem. Compile the attached program with:

gcc -O2 -W -S pr21161.i

The output, which is a false positive, is:

pr21161.i: In function ‘find_dir_file_pathname’:
pr21161.i:22:15: warning: variable ‘match’ might be clobbered by ‘longjmp’ or
‘vfork’ [-Wclobbered]
   22 |   char const *match = file;
      |               ^~~~~

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/21161] [11/12/13/14 Regression] "clobbered by longjmp" warning ignores the data flow
       [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2023-05-19 22:19 ` [Bug middle-end/21161] [10/11/12/13/14 " eggert at cs dot ucla.edu
@ 2023-07-07 10:28 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21161

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #27 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-07-07 10:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-21161-4@http.gcc.gnu.org/bugzilla/>
2012-01-11 13:06 ` [Bug middle-end/21161] "clobbered by longjmp" warning ignores the data flow rguenth at gcc dot gnu.org
2012-09-29 22:25 ` tg at mirbsd dot org
2021-05-14  9:45 ` [Bug middle-end/21161] [9/10/11/12 Regression] " jakub at gcc dot gnu.org
2021-06-01  8:03 ` rguenth at gcc dot gnu.org
2022-05-27  9:33 ` [Bug middle-end/21161] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:28 ` jakub at gcc dot gnu.org
2023-03-23 19:44 ` pinskia at gcc dot gnu.org
2023-05-19 22:19 ` [Bug middle-end/21161] [10/11/12/13/14 " eggert at cs dot ucla.edu
2023-07-07 10:28 ` [Bug middle-end/21161] [11/12/13/14 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).