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

            Bug ID: 60685
           Summary: exception not caught by enclosing catch
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jens.maurer at gmx dot net

Created attachment 32465
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32465&action=edit
source code to reproduce the issue

When compiling and linking the attached two files, I get a core dump,
although I expect the catch(Ex&):

$ g++ -v -std=c++11 x.cc y.cc
...
GNU C++ (GCC) version 4.8.2 (x86_64-unknown-linux-gnu)
...

$ gdb ./a.out
(gdb) run
Starting program: /home/jmaurer/IDMS/svn/trunk/libs/tlfr/fundamental/./a.out 
terminate called after throwing an instance of 'Ex'

Program received signal SIGABRT, Aborted.

(gdb) bt
#0  0x00007ffff722bf77 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff722f5e8 in __GI_abort () at abort.c:90
#2  0x00007ffff7b376e5 in __gnu_cxx::__verbose_terminate_handler() ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff7b35856 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7b34919 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7b354ca in __gxx_personality_v0 ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff75cc7f3 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#7  0x00007ffff75ccb8b in _Unwind_RaiseException ()
   from /lib/x86_64-linux-gnu/libgcc_s.so.1
#8  0x00007ffff7b35aa1 in __cxa_throw ()
   from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9  0x000000000040094e in B::B() ()
#10 0x0000000000400978 in A::f() ()
#11 0x0000000000400923 in S::S(A&) ()
#12 0x00000000004008ba in main ()


$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.23.52.20130913

This is also reproducible with

$ ld --version
GNU gold (GNU Binutils for Ubuntu 2.23.52.20130913) 1.11

Reply via email to