This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c++/1843: Segmentation fault during try/catch exceptions.



>Number:         1843
>Category:       c++
>Synopsis:       Segmentation fault during try/catch exceptions.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 02 14:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Steven Belbin
>Release:        gcc 2.95.3 19991030
>Organization:
>Environment:
Linux Mandrake 7.1
>Description:
A segmentation fault is raised in the destructor of the class which inherited and virtual in a child class.

This occurs when throwing the child class as an exception and catching the parent class as a reference.

When not virtual is not specified in the inhertence then the sample works, or when the catch is changed from a reference to a pointer.

However these are unacceptable solutions, since the case that triggered this issue is more complex.

Under MS Visual C++ 6.0 & Borland C++ there are no faults.
>How-To-Repeat:
Simply compile & execute the attached file
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]