c++/1843: Segmentation fault during try/catch exceptions.
steven.belbin@delta-tek.com
steven.belbin@delta-tek.com
Fri Feb 2 14:56:00 GMT 2001
>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:
More information about the Gcc-bugs
mailing list