This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: EH unwind bug
- To: tom at zaphod dot wh9 dot tu-dresden dot de (Thomas Weise), egcs at cygnus dot com
- Subject: Re: EH unwind bug
- From: Jason Merrill <jason at cygnus dot com>
- Date: 26 Nov 1997 00:52:26 -0800
- References: <347B307E.80D08A44.cygnus.egcs@zaphod.wh9.tu-dresden.de>
>>>>> Thomas Weise <tom@zaphod.wh9.tu-dresden.de> writes:
> This is, the local object's destructor is executed twice, before the
> exception raiser's destructor and again after raising the exception.
This will be hard to fix. The problem is that the return statement is
represented as a jump to the end of the function. Jumps out of a scope run
any necessary cleanups; in this case, the destructors for obj and rais.
These cleanups are expanded at the point of the jump, which is inside the
EH regions for those same cleanups.
Fixing this will involve reworking fixup_gotos.
> Using -fsjlj-exceptions is fine. I hope this testcase comes in time and
> can be fixed before release.
-fsjlj-exceptions works for this testcase because it doesn't use EH regions
for those cleanups.
Jason