Bug 18509 - [3.3 only] [hppa] try-catch program fails when compiled with frame pointers
Summary: [3.3 only] [hppa] try-catch program fails when compiled with frame pointers
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.5
: P2 normal
Target Milestone: 3.3.6
Assignee: Not yet assigned to anyone
URL:
Keywords: EH, wrong-code
Depends on:
Blocks:
 
Reported: 2004-11-16 00:06 UTC by Randolph Chung
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: hppa-unknown-linux
Target: hppa-unknown-linux
Build: hppa-unknown-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Test case (233 bytes, text/plain)
2004-11-16 00:07 UTC, Randolph Chung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randolph Chung 2004-11-16 00:06:44 UTC
tausq@ios:/tmp$ g++ -o try_catch try_catch.cc
tausq@ios:/tmp$ ./try_catch
Segmentation fault (core dumped)

tausq@ios:/tmp$ g++ -fomit-frame-pointer -o try_catch try_catch.cc
tausq@ios:/tmp$ ./try_catch
tausq@ios:/tmp$ 

tausq@ios:/tmp$ g++ -O1 -fno-omit-frame-pointer -o try_catch try_catch.cc
tausq@ios:/tmp$ ./try_catch
free(): invalid pointer 0xbff004b8!
Segmentation fault (core dumped)
tausq@ios:/tmp$

The same problem is seen in 3.0, but not in gcc-3.4.
Comment 1 Randolph Chung 2004-11-16 00:07:46 UTC
Created attachment 7550 [details]
Test case
Comment 2 Andrew Pinski 2004-11-16 00:13:40 UTC
This is most likely only effects 3.3.x because something changed in the back-end to support 
exceptions better.
Comment 3 John David Anglin 2004-11-16 00:40:18 UTC
I don't believe there have been any specific changes to the backend
with respect to exception support since 3.3.0.  3.0 didn't have dwarf2
EH support.  There possibly have been some changes in the libstdc++
support.

Which exception model (sjlj or dwarf2) are you using?
Comment 4 Randolph Chung 2004-11-16 00:55:28 UTC
(In reply to comment #3)
> I don't believe there have been any specific changes to the backend
> with respect to exception support since 3.3.0.  3.0 didn't have dwarf2
> EH support.  There possibly have been some changes in the libstdc++
> support.
> 
> Which exception model (sjlj or dwarf2) are you using?

sjlj for gcc-3.3. now that you mention it, i see that my 3.4 compiler is
compiled to use dwarf2. 

i don't have a sjlj-compiled gcc-3.4 compiler handy... but i can try it if that
will help.

randolph
Comment 5 dave 2004-11-16 01:00:26 UTC
Subject: Re:  [3.3 only] [hppa] try-catch program fails when

> > Which exception model (sjlj or dwarf2) are you using?
> 
> sjlj for gcc-3.3. now that you mention it, i see that my 3.4 compiler is
> compiled to use dwarf2. 
> 
> i don't have a sjlj-compiled gcc-3.4 compiler handy... but i can try it if
> that
> will help.

I don't test sjlj much on linux.  I know java has more testfails
with sjlj and I think that may also be the case for libstdc++.

Dave
Comment 6 Gabriel Dos Reis 2005-04-30 13:10:38 UTC
Not critical.