public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4381: Exceptions virtually inherited from a class cause segmentation fault at run time
@ 2002-03-17  9:28 jason
  0 siblings, 0 replies; 4+ messages in thread
From: jason @ 2002-03-17  9:28 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jason, nobody, rodrigc, topiolli

Synopsis: Exceptions virtually inherited from a class cause segmentation fault at run time

Responsible-Changed-From-To: unassigned->jason
Responsible-Changed-By: jason
Responsible-Changed-When: Sun Mar 17 09:28:24 2002
Responsible-Changed-Why:
    got it

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4381


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

* Re: c++/4381: Exceptions virtually inherited from a class cause segmentation fault at run time
@ 2002-03-17 16:15 jason
  0 siblings, 0 replies; 4+ messages in thread
From: jason @ 2002-03-17 16:15 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, jason, rodrigc, topiolli

Synopsis: Exceptions virtually inherited from a class cause segmentation fault at run time

State-Changed-From-To: analyzed->closed
State-Changed-By: jason
State-Changed-When: Sun Mar 17 16:15:47 2002
State-Changed-Why:
    Fixed for 3.1 by
    
    2002-03-17  Jason Merrill  <jason@redhat.com>
    
            PR c++/4381
            * libsupc++/eh_personality.cc (get_adjusted_ptr): New static fn.
            (check_exception_spec): Call it.  Take the thrown pointer.
            (__cxa_call_unexpected): Pass it.
            (PERSONALITY_FUNCTION): Likewise.  Use get_adjusted_ptr.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4381


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

* Re: c++/4381: Exceptions virtually inherited from a class cause segmentation fault at run time
@ 2001-09-27 22:27 rodrigc
  0 siblings, 0 replies; 4+ messages in thread
From: rodrigc @ 2001-09-27 22:27 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, rodrigc, topiolli

Synopsis: Exceptions virtually inherited from a class cause segmentation fault at run time

State-Changed-From-To: open->analyzed
State-Changed-By: rodrigc
State-Changed-When: Thu Sep 27 22:27:49 2001
State-Changed-Why:
    Verified with gcc version 3.0.2 20010927 (prerelease)
    under Linux.
    
    A backtrace of the resulting Segmentation Fault
    reveals:
    
    Program received signal SIGSEGV, Segmentation fault.  
    
    #0  __cxxabiv1::__vmi_class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info::__upcast_result&) const (this=0x804dca0, dst=0x804dc80, obj_ptr=0x1a,
        result=@0xbffff2b0) at tinfo.cc:104
    #1  0x4005f9fa in __cxxabiv1::__class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void**) const (this=0x804dca0,
        dst_type=0x804dc80, obj_ptr=0xbffff318) at tinfo.cc:228
    #2  0x4005f9bb in __cxxabiv1::__class_type_info::__do_catch(std::type_info const*, void**, unsigned) const (this=0x804dc80,
        thr_type=0x804dca0, thr_obj=0xbffff318, outer=1) at tinfo.cc:219
    #3  0x4005ea39 in check_exception_spec(lsda_header_info*, std::type_info const*, long) (info=0xbffff3b0, throw_type=0x804dca0,
        filter_value=-1) at eh_personality.cc:119
    #4  0x4005ee29 in __gxx_personality_v0 (version=1, actions=2,
        exception_class=5138137972254386944, ue_header=0x8050448,
        context=0xbffff5c0) at eh_personality.cc:331
    #5  0x400e73b5 in _Unwind_RaiseException_Phase2 (exc=0x8050448,
        context=0xbffff5c0) at unwind-dw2.c:1045
    #6  0x400e74fb in _Unwind_RaiseException (exc=0x8050448)
        at unwind-dw2.c:1045
    #7  0x4005f1a8 in __cxa_throw (obj=0x8050468, tinfo=0x804dca0,
        dest=0) at eh_throw.cc:72
    #8  0x0804a4f7 in func() ()
    #9  0x0804a52f in main ()
    #10 0x40106e5e in __libc_start_main (main=0x804a520 <main>, argc=1,
        ubp_av=0xbffff7b4, init=0x804a110 <_init>,
        fini=0x804cad0 <_fini>, rtld_fini=0x4000d3c4 <_dl_fini>,
        stack_end=0xbffff7ac) at ../sysdeps/generic/libc-start.c:129

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4381&database=gcc


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

* c++/4381: Exceptions virtually inherited from a class cause segmentation fault at run time
@ 2001-09-24  2:46 topiolli
  0 siblings, 0 replies; 4+ messages in thread
From: topiolli @ 2001-09-24  2:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4381
>Category:       c++
>Synopsis:       Exceptions virtually inherited from a class cause segmentation fault at run time
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 24 02:46:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     topiolli@ee.oulu.fi
>Release:        g++ 3.0.1
>Organization:
>Environment:
SunOS 5.8 Generic_108528-09 sun4u sparc SUNW,Ultra-80

Reading specs from /local/bin/../lib/gcc-lib/sparc-sun-solaris2.8/3.0.1/specs
Configured with: ../configure --with-cpu=ultrasparc
Thread model: posix
gcc version 3.0.1
>Description:
If an exception is virtually inherited from a base class, it
causes a segmentation fault when thrown at run time. The
problem occurs only when a throw clause is specified in
a function description. The exception that is specified 
first in the clause will work fine, the rest not.

There are also some other problems with virtually inherited
exceptions, but I haven't been able to track them down this
far. One of them occurs with long try blocks. I get an error
message from the assembler which says "constant value out
of range".
>How-To-Repeat:
Compile the attached program with g++ -o test Test3.cc and
run it. It should cause a segmentation fault.
>Fix:
N/A
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="Test3.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Test3.cc"

I2luY2x1ZGUgPHN0cmluZz4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0
ZDsKCmNsYXNzIEJhc2Uge307CgpjbGFzcyBBIDogdmlydHVhbCBwdWJsaWMgQmFzZQp7CnB1Ymxp
YzoKCUEoaW50IGZvbykge30KfTsKCmNsYXNzIEIgOiB2aXJ0dWFsIHB1YmxpYyBCYXNlCnsKcHVi
bGljOgoJQihpbnQgZm9vKSB7fQp9OwoKCnZvaWQgZnVuYygpIHRocm93IChCJixBJikgLy9yZW1v
dmUgdGhyb3cgY2xhdXNlIGFuZCBpdCB3aWxsIHdvcmsKewoJdGhyb3cgQSgxKTsgLy9jYXVzZXMg
YSBzZWdtZW50YXRpb24gZmF1bHQKCS8vdGhyb3cgQigxKTsgLy93b3JrcwoJLy9Cb3RoIHdvcmsg
aWYgdGhleSBhcmUgbm90IF92aXJ0dWFsbHlfIGluaGVyaXRlZCBmcm9tIEJhc2UKfQoKaW50IG1h
aW4odm9pZCkKewoJdHJ5CXsJZnVuYygpOyB9CgljYXRjaCAoQSYgYSkgeyBjZXJyIDw8ICJBIiA8
PCBlbmRsOyB9CgljYXRjaCAoQiYgYSkgeyBjZXJyIDw8ICJCIiA8PCBlbmRsOyB9Cn0K


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

end of thread, other threads:[~2002-03-18  0:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-17  9:28 c++/4381: Exceptions virtually inherited from a class cause segmentation fault at run time jason
  -- strict thread matches above, loose matches on Subject: below --
2002-03-17 16:15 jason
2001-09-27 22:27 rodrigc
2001-09-24  2:46 topiolli

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).