public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4356: Exception handling does not work at all for NetBSD/i386 ELF target
@ 2001-10-16 15:46 Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2001-10-16 15:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/4356; it has been noted by GNATS.

From: Richard Henderson <rth@redhat.com>
To: Krister Walfridsson <cato@df.lth.se>
Cc: olgerd@pobox.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org,
       gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: c++/4356: Exception handling does not work at all for NetBSD/i386 ELF target
Date: Tue, 16 Oct 2001 15:37:02 -0700

 On Tue, Oct 16, 2001 at 11:31:23PM +0200, Krister Walfridsson wrote:
 > Well, in the process of throwing/catching an exception we run some
 > code.  Among other, the function read_encoded_value_with_base() in
 > eh_personality.cc.  And that function has a switch statment...
 
 Ah, ok.
 
 > Actually I have no clue if JUMP_TABLES_IN_TEXT_SECTION is needed, but
 > the FreeBSD ELF version has a comment claiming it is necessary. And
 > NetBSD and FreeBSD is nearly identical, so if it is needed by FreeBSD,
 > then it is needed by NetBSD too...
 
 Oh, I see.  I'd forgotten about the silly way that switch
 statements are actually implemented on x86-elf.  That can
 be fixed if we assume a recent assembler...
 
 Applied.
 
 
 r~


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: c++/4356: Exception handling does not work at all for NetBSD/i386 ELF target
@ 2001-10-16 13:56 Richard Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2001-10-16 13:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/4356; it has been noted by GNATS.

From: Richard Henderson <rth@redhat.com>
To: Krister Walfridsson <cato@df.lth.se>
Cc: olgerd@pobox.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org,
       gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: c++/4356: Exception handling does not work at all for NetBSD/i386 ELF target
Date: Tue, 16 Oct 2001 13:52:33 -0700

 On Mon, Oct 15, 2001 at 11:25:45PM +0200, Krister Walfridsson wrote:
 >         * config/i386/netbsd-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Define.
 >         (JUMP_TABLES_IN_TEXT_SECTION): Define.
 
 Err..  This has nothing at all to do with exception handling.
 It has everything to do with switch statements.
 
 So what is the actual problem here, given that readonly_data_section
 will fall back to text_section on a.out systems?
 
 
 
 r~


^ permalink raw reply	[flat|nested] 3+ messages in thread

* c++/4356: Exception handling does not work at all for NetBSD/i386 ELF target
@ 2001-09-18 19:26 olgerd
  0 siblings, 0 replies; 3+ messages in thread
From: olgerd @ 2001-09-18 19:26 UTC (permalink / raw)
  To: gcc-gnats

>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==


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-10-16 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-16 15:46 c++/4356: Exception handling does not work at all for NetBSD/i386 ELF target Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2001-10-16 13:56 Richard Henderson
2001-09-18 19:26 olgerd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).