This is the mail archive of the gcc@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]

Re: EH unwind bug


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


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