http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55693
Aldy Hernandez <aldyh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aldyh at gcc dot gnu.org AssignedTo|unassigned at gcc dot |aldyh at gcc dot gnu.org |gnu.org | --- Comment #10 from Aldy Hernandez <aldyh at gcc dot gnu.org> 2013-01-17 17:35:44 UTC --- This looks like a problem totally unrelated to libitm and friends. The ICE happens because dyld_stub___cxa_allocate_exception() is returning 0, which then gets dereferenced. For that matter, it happens on a plain C++ program compiling and linking the way dejagnu is setting things up: Yanory-Hernandezs-MacBook:testsuite aldyh$ cat a.C static void f1(){ throw 1; } int main() { try { f1(); } catch (...) { } } Yanory-Hernandezs-MacBook:testsuite aldyh$ /Users/aldyh/bld/1/gcc/xgcc -B/Users/aldyh/bld/1/gcc/ a.C -B/Users/aldyh/bld/1/x86_64-apple-darwin10.8.0/./libitm/ -I/Users/aldyh/bld/1/x86_64-apple-darwin10.8.0/./libitm -I/mnt/gcc/libitm/testsuite/.. -shared-libgcc -fmessage-length=0 -fgnu-tm -nostdinc++ -I/Users/aldyh/bld/1/x86_64-apple-darwin10.8.0/libstdc++-v3/include/x86_64-apple-darwin10.8.0 -I/Users/aldyh/bld/1/x86_64-apple-darwin10.8.0/libstdc++-v3/include -I/mnt/gcc/libstdc++-v3/libsupc++ -I/mnt/gcc/libstdc++-v3/include/backward -I/mnt/gcc/libstdc++-v3/testsuite/util -L/Users/aldyh/bld/1/x86_64-apple-darwin10.8.0/./libitm/.libs -L/Users/aldyh/bld/1/x86_64-apple-darwin10.8.0/./libitm/../libstdc++-v3/src/.libs -shared-libgcc -lstdc++ -lm -g -o ./a.out Yanory-Hernandezs-MacBook:testsuite aldyh$ ./a.out Segmentation fault (gdb) b f1 Breakpoint 1 at 0x100000890: file a.C, line 2. (gdb) disp/i $pc (gdb) r Starting program: /Users/aldyh/bld/1/x86_64-apple-darwin10.8.0/libitm/testsuite/a.out Reading symbols for shared libraries ++++. done Breakpoint 1, 0x0000000100000890 in f1 () at a.C:2 2 throw 1; 1: x/i $pc 0x100000890 <f1+4>: mov $0x4,%edi (gdb) si 0x0000000100000895 2 throw 1; 1: x/i $pc 0x100000895 <f1+9>: callq 0x1000009ae <dyld_stub___cxa_allocate_exception> (gdb) 0x00000001000009ae in dyld_stub___cxa_allocate_exception () 1: x/i $pc 0x1000009ae <dyld_stub___cxa_allocate_exception>: jmpq *0x68c(%rip) # 0x100001040 (gdb) 0x00000001000008e0 in __cxa_allocate_exception () 1: x/i $pc 0x1000008e0 <__cxa_allocate_exception>: xor %eax,%eax (gdb) 0x00000001000008e2 in __cxa_allocate_exception () 1: x/i $pc 0x1000008e2 <__cxa_allocate_exception+2>: retq (gdb) 0x000000010000089a in f1 () at a.C:2 2 throw 1; 1: x/i $pc 0x10000089a <f1+14>: movl $0x1,(%rax) (gdb) Investigating whether this __cxa_allocation_exception() is coming from trunk/libstdc++-v3 or from the system libstdc++...