This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/4356: Exception handling does not work at all for NetBSD/i386 ELF target
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/4356: Exception handling does not work at all for NetBSD/i386 ELF target
- From: olgerd at pobox dot com
- Date: 19 Sep 2001 02:23:02 -0000
- Reply-To: olgerd at pobox dot com
>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
>Closed-Date:
>Last-Modified:
>Originator: Oleg Polyanski
>Release: NetBSD 1.5 (-current as well)
>Organization:
>Environment:
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.
>Description:
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
>How-To-Repeat:
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.
>Fix:
Not provided.
Please contact if any additional information is required that might help to find the reason or fix the bug.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="exc.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="exc.ii"
IyAxICJleGMuQyIKIyAxICI8YnVpbHRpbj4iCiMgMSAiPGNvbW1hbmQgbGluZT4iCiMgMSAiZXhj
LkMiCmNsYXNzIEEgeyB9OwoKaW50Cm1haW4gKHZvaWQpCnsKICAgICAgICB0cnkgewogICAgICAg
ICAgICAgICAgdGhyb3cgQSAoKTsKICAgICAgICB9CiAgICAgICAgY2F0Y2ggKEEgJmUpIHsKICAg
ICAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgIH0KICAgICAgICBjYXRjaCAoLi4uKSB7CiAg
ICAgICAgICAgICAgICByZXR1cm4gMjsKICAgICAgICB9CgogICAgICAgIHJldHVybiAwOwp9Cg==