public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
@ 2004-06-15 12:27 Vyatcheslav dot Sysoltsev at intel dot com
  2004-06-15 12:29 ` [Bug c/15996] " Vyatcheslav dot Sysoltsev at intel dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Vyatcheslav dot Sysoltsev at intel dot com @ 2004-06-15 12:27 UTC (permalink / raw)
  To: gcc-bugs

I use just built snapshot of gcc 3.5.0 20040613, built on Red Hat Enterprise
Linux AS release 3 (Taroon Update 2) with i686 architecture, configured with
--prefix=/home/shared_storage/gcc_sources/gcc-bin/ia32 --disable-libgcj
--disable-libada.

Compiling the following test case:
#include <stdio.h>
#include <setjmp.h>

jmp_buf env[2];

#define TRACE(x) printf("Doing longjmp %d\n", x);

int main()
{
    if (!__builtin_setjmp(env[0])) {
        if (!__builtin_setjmp(env[1])) {
            TRACE(1);
            __builtin_longjmp(env[1], 1);
        }
        TRACE(0);
        __builtin_longjmp(env[0], 1);
    }
    return 0;
}

newest gcc produces (command line `gcc test.c`) the code that fails with
segmentation fault doing the second longjmp:
Doing longjmp 1
Segmentation fault

gcc 3.2 installed in the system produces correct code:
Doing longjmp 1
Doing longjmp 0

The preprocessed file test.i is attached if you need.

-- 
           Summary: __builtin_longjmp just after another __builtin_longjmp
                    fails with null dereferencing
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: Vyatcheslav dot Sysoltsev at intel dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: 3.5.0 20040613
  GCC host triplet: i686
GCC target triplet: i686


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


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

* [Bug c/15996] __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
  2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
@ 2004-06-15 12:29 ` Vyatcheslav dot Sysoltsev at intel dot com
  2004-06-15 14:04 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vyatcheslav dot Sysoltsev at intel dot com @ 2004-06-15 12:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Vyatcheslav dot Sysoltsev at intel dot com  2004-06-15 12:29 -------
Created an attachment (id=6530)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6530&action=view)
preprocessed test case


-- 


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


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

* [Bug c/15996] __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
  2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
  2004-06-15 12:29 ` [Bug c/15996] " Vyatcheslav dot Sysoltsev at intel dot com
@ 2004-06-15 14:04 ` pinskia at gcc dot gnu dot org
  2004-06-21  7:48 ` Vyatcheslav dot Sysoltsev at intel dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-15 14:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-15 14:04 -------
Can you try with a new compiler as it works for me on 20040614.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


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


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

* [Bug c/15996] __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
  2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
  2004-06-15 12:29 ` [Bug c/15996] " Vyatcheslav dot Sysoltsev at intel dot com
  2004-06-15 14:04 ` pinskia at gcc dot gnu dot org
@ 2004-06-21  7:48 ` Vyatcheslav dot Sysoltsev at intel dot com
  2004-06-21 16:14 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vyatcheslav dot Sysoltsev at intel dot com @ 2004-06-21  7:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Vyatcheslav dot Sysoltsev at intel dot com  2004-06-21 07:48 -------
Still reproducible with gcc version 3.5.0 20040620 (experimental)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|                            |1


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


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

* [Bug c/15996] __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
  2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
                   ` (2 preceding siblings ...)
  2004-06-21  7:48 ` Vyatcheslav dot Sysoltsev at intel dot com
@ 2004-06-21 16:14 ` pinskia at gcc dot gnu dot org
  2004-06-21 16:17 ` Vyatcheslav dot Sysoltsev at intel dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-21 16:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-21 16:14 -------
I still unable to reproduce this on the mainline on i686-pc-linux-gnu.
Can you provide the full output of "gcc -v test.c" as this might be a bug in binutils?

I am using "GNU assembler 2.15.91 20040607" and I cannot reproduce it.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


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


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

* [Bug c/15996] __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
  2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
                   ` (3 preceding siblings ...)
  2004-06-21 16:14 ` pinskia at gcc dot gnu dot org
@ 2004-06-21 16:17 ` Vyatcheslav dot Sysoltsev at intel dot com
  2004-06-21 16:21 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Vyatcheslav dot Sysoltsev at intel dot com @ 2004-06-21 16:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Vyatcheslav dot Sysoltsev at intel dot com  2004-06-21 16:17 -------
Reading specs from /home/shared_storage/gcc_sources/gcc-bin/ia32/lib/gcc/i686-
pc-linux-gnu/3.5.0/specs
Configured with: /users/vsysoltx/work/gcc-3.5-20040620/configure --
prefix=/home/shared_storage/gcc_sources/gcc-bin/ia32 --disable-libgcj --disable-
libada
Thread model: posix
gcc version 3.5.0 20040620 (experimental)
 /home/shared_storage/gcc_sources/gcc-bin/ia32/libexec/gcc/i686-pc-linux-
gnu/3.5.0/cc1 -quiet -v test.c -quiet -dumpbase test.c -mtune=pentiumpro -
auxbase test -version -o /users/vsysoltx/tmp/ccqCgpkT.s
ignoring nonexistent directory "/home/shared_storage/gcc_sources/gcc-
bin/ia32/lib/gcc/i686-pc-linux-gnu/3.5.0/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /home/shared_storage/gcc_sources/gcc-bin/ia32/include
 /home/shared_storage/gcc_sources/gcc-bin/ia32/lib/gcc/i686-pc-linux-
gnu/3.5.0/include
 /usr/include
End of search list.
GNU C version 3.5.0 20040620 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 3.2.3 20030502 (Red Hat Linux 3.2.3-34).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
 as -V -Qy -o /users/vsysoltx/tmp/ccOuCy8E.o /users/vsysoltx/tmp/ccqCgpkT.s
GNU assembler version 2.14.90.0.4 (i386-redhat-linux) using BFD version 
2.14.90.0.4 20030523
 /home/shared_storage/gcc_sources/gcc-bin/ia32/libexec/gcc/i686-pc-linux-
gnu/3.5.0/collect2 --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-
linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /home/shared_storage/gcc_sources/gcc-
bin/ia32/lib/gcc/i686-pc-linux-gnu/3.5.0/crtbegin.o -
L/home/shared_storage/gcc_sources/gcc-bin/ia32/lib/gcc/i686-pc-linux-gnu/3.5.0 -
L/home/shared_storage/gcc_sources/gcc-bin/ia32/lib/gcc/i686-pc-linux-
gnu/3.5.0/../../.. /users/vsysoltx/tmp/ccOuCy8E.o -lgcc -lgcc_eh -lc -lgcc -
lgcc_eh /home/shared_storage/gcc_sources/gcc-bin/ia32/lib/gcc/i686-pc-linux-
gnu/3.5.0/crtend.o /usr/lib/crtn.o


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


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


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

* [Bug c/15996] __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
  2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
                   ` (4 preceding siblings ...)
  2004-06-21 16:17 ` Vyatcheslav dot Sysoltsev at intel dot com
@ 2004-06-21 16:21 ` pinskia at gcc dot gnu dot org
  2004-06-21 16:23 ` Vyatcheslav dot Sysoltsev at intel dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-21 16:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-21 16:21 -------
What happens if you rebuild gcc and you bootstrap this time instead of just make as what could be 
happening is that the compiler you start with is miscompiling the new one.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


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


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

* [Bug c/15996] __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
  2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
                   ` (5 preceding siblings ...)
  2004-06-21 16:21 ` pinskia at gcc dot gnu dot org
@ 2004-06-21 16:23 ` Vyatcheslav dot Sysoltsev at intel dot com
  2004-06-21 16:28 ` pinskia at gcc dot gnu dot org
  2004-06-21 17:07 ` Vyatcheslav dot Sysoltsev at intel dot com
  8 siblings, 0 replies; 10+ messages in thread
From: Vyatcheslav dot Sysoltsev at intel dot com @ 2004-06-21 16:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Vyatcheslav dot Sysoltsev at intel dot com  2004-06-21 16:23 -------
How to perform this? I don't understand clearly what you're asking.

-- 


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


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

* [Bug c/15996] __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
  2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
                   ` (6 preceding siblings ...)
  2004-06-21 16:23 ` Vyatcheslav dot Sysoltsev at intel dot com
@ 2004-06-21 16:28 ` pinskia at gcc dot gnu dot org
  2004-06-21 17:07 ` Vyatcheslav dot Sysoltsev at intel dot com
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-21 16:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-21 16:28 -------
Ovbiously you did not read <http://gcc.gnu.org/install/> at all.

Basically you do a "make bootstrap" rather than just make.

-- 


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


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

* [Bug c/15996] __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing
  2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
                   ` (7 preceding siblings ...)
  2004-06-21 16:28 ` pinskia at gcc dot gnu dot org
@ 2004-06-21 17:07 ` Vyatcheslav dot Sysoltsev at intel dot com
  8 siblings, 0 replies; 10+ messages in thread
From: Vyatcheslav dot Sysoltsev at intel dot com @ 2004-06-21 17:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Vyatcheslav dot Sysoltsev at intel dot com  2004-06-21 17:07 -------
I've done make clean, make bootstrap and make install, this didn't help, result 
is the same.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW


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


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

end of thread, other threads:[~2004-06-21 17:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-15 12:27 [Bug c/15996] New: __builtin_longjmp just after another __builtin_longjmp fails with null dereferencing Vyatcheslav dot Sysoltsev at intel dot com
2004-06-15 12:29 ` [Bug c/15996] " Vyatcheslav dot Sysoltsev at intel dot com
2004-06-15 14:04 ` pinskia at gcc dot gnu dot org
2004-06-21  7:48 ` Vyatcheslav dot Sysoltsev at intel dot com
2004-06-21 16:14 ` pinskia at gcc dot gnu dot org
2004-06-21 16:17 ` Vyatcheslav dot Sysoltsev at intel dot com
2004-06-21 16:21 ` pinskia at gcc dot gnu dot org
2004-06-21 16:23 ` Vyatcheslav dot Sysoltsev at intel dot com
2004-06-21 16:28 ` pinskia at gcc dot gnu dot org
2004-06-21 17:07 ` Vyatcheslav dot Sysoltsev at intel dot com

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).