c++/4356: Exception handling does not work at all for NetBSD/i386 ELF target

olgerd@pobox.com olgerd@pobox.com
Tue Sep 18 19:26:00 GMT 2001

>Number:         4356
>Category:       c++
>Synopsis:       Exception handling does not work at all for NetBSD/i386 ELF target
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 18 19:26:01 PDT 2001
>Originator:     Oleg Polyanski
>Release:        NetBSD 1.5 (-current as well)
Operating system: NetBSD/i386 1.5, -current,
Compiler version: gcc version 3.1 20010918 (actually, all post 3.0 versions are affected) configured with options:

../configure --with-gcc-version-trigger=/usr/src/CVS-mirrors/gcc/gcc/version.c --host=i386-unknown-netbsdelf1.5Y --prefix=/usr/local/gcc-3.1-debug --enable-shared=libgcc,zlib,libstdc++,boehm-gc,libjava --disable-checking --norecursion

Compiler options: no special options are required to reproduce the bug.
Any C++ programm using exception handling will cause core dump. Running the test programm (that is provided with this PR) under debugger has shown that `abort ()' is called after falling through the 'switch (fs->cfa_how)' statement in 'uw_update_context_1' to default label. 
Full traceback is provided as well:

#0  0x8049395 in uw_update_context (context=0xbfbfd050, fs=0xbfbfcf90)
    at ../../gcc/unwind-dw2.c:1042
#1  0x8049649 in _Unwind_RaiseException (exc=0x805402c)
    at ../../gcc/unwind.inc:1042
#2  0x804da78 in __cxa_throw (obj=0x805404c, tinfo=0x8050f4c, dest=0)
    at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:72
#3  0x80483f0 in main () at exc.C:7
Try to compile and run any C++ program with recent version of g++ that throws exceptions (the trivial example is provided in attachment) on NetBSD/i386 ELF.
Not provided.

Please contact if any additional information is required that might help to find the reason or fix the bug.
Content-Type: text/x-c++src; name="exc.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="exc.ii"


More information about the Gcc-bugs mailing list