http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57498
Bug ID: 57498 Summary: rethrow_exception causes segfault when another exception is active and catch present Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: f.heckenb...@fh-soft.de Created attachment 30237 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30237&action=edit Test case i486-linux-gnu g++-4.7 (Debian 4.7.2-4) 4.7.2 libstdc++6 (Debian 4.7.2-4) Not sure if the problem is in the compiler or library. Using rethrow_exception when another exception is active and has a matching catch clause causes a segfault: % g++-4.7 -std=c++11 test.cpp && ./a.out Segmentation fault It does not occur when the second exception is thrown normally (commented out throw statement). According to gdb, it jumps to address 0: (gdb) r Starting program: a.out Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () Cannot access memory at address 0x8 (gdb) p $eip $1 = (void (*)(void)) 0