This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/1843: Segmentation fault during try/catch exceptions.
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/1843: Segmentation fault during try/catch exceptions.
- From: steven dot belbin at delta-tek dot com
- Date: 2 Feb 2001 22:52:10 -0000
- Cc: xavier dot oriol at delta-tek dot com
- Reply-To: steven dot belbin at delta-tek dot com
>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: