public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@cygnus.com>
To: tom@zaphod.wh9.tu-dresden.de (Thomas Weise), egcs@cygnus.com
Subject: Re: EH unwind bug
Date: Wed, 26 Nov 1997 06:10:00 -0000	[thread overview]
Message-ID: <u9yb2cf35h.fsf@yorick.cygnus.com> (raw)
In-Reply-To: <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

       reply	other threads:[~1997-11-26  6:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <347B307E.80D08A44.cygnus.egcs@zaphod.wh9.tu-dresden.de>
1997-11-26  6:10 ` Jason Merrill [this message]
     [not found] <347B076D.6F1CEC10.cygnus.egcs.bugs@zaphod.wh9.tu-dresden.de>
     [not found] ` <u9btz0cs9q.fsf@yorick.cygnus.com>
1997-12-02  9:56   ` Thomas Weise
1997-12-03  0:21     ` Jason Merrill
1997-12-03  5:46       ` Thomas Weise
1997-12-03  8:23         ` Jeffrey A Law
1997-11-25 16:09 Thomas Weise
  -- strict thread matches above, loose matches on Subject: below --
1997-11-25  8:14 Thomas Weise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u9yb2cf35h.fsf@yorick.cygnus.com \
    --to=jason@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=tom@zaphod.wh9.tu-dresden.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).