public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: matz@suse.de (Michael Matz)
Cc: richard.guenther@gmail.com (Richard Guenther), gcc-patches@gcc.gnu.org
Subject: Re: Mark objects death@end of scope
Date: Fri, 11 Nov 2011 17:45:00 -0000	[thread overview]
Message-ID: <201111111717.pABHHIpL005037@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1111111732070.32478@wotan.suse.de> from "Michael Matz" at Nov 11, 2011 05:50:36 PM

Michael Matz wrote:
> On Fri, 11 Nov 2011, Ulrich Weigand wrote:
> 
> > One reason why this happens is that the unwind*.c files are specifically 
> > built with -fexception.  I think this is for the benefit of the DWARF 
> > unwinder, to ensure CFI records are available for those routines.
> 
> Except for the routines that start the backtracing (e.g.
> _Unwind_RaiseException) I don't see how descriptors for them are useful.  
> But even those use local variables that would be handled by the scope-end 
> clobbers.  Hmpf.  Why does the sjlj unwinder go into an endless loop, and 
> only in _Resume, not already in the first phase (i.e. from 
> _RaiseException), which also iterates over the backtrace.

I haven't fully debugged it yet, but it seems to be related to the linked
list of unwind contexts that are maintained by the SjLj logic.  During
unwinding, those are pulled off the list one by one; it seems the routines
that do that don't expect that new contexts for the _Unwind routines
themselves are being implicitly pushed onto that list while the unwinding
happens ...

> If we can't fix the sjlj unwinder to cope with this situation I don't see 
> much choice than implementing a command line flag disabling the clobbers 
> and use that for compiling the unwinder :-/

I guess one attempt might be to build the unwinder files with
-funwind-tables instead of -fexceptions ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2011-11-11 17:17 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03  0:05 Mark objects death at end " Michael Matz
2011-11-03  1:21 ` Eric Botcazou
2011-11-03  9:24   ` Richard Guenther
2011-11-03 10:26     ` Eric Botcazou
2011-11-03 12:52       ` Richard Guenther
2011-11-03 13:42         ` Michael Matz
2011-11-03 14:33           ` Eric Botcazou
2011-11-03 14:46             ` Michael Matz
2011-11-03 14:55               ` Eric Botcazou
2011-11-03 14:23       ` Build gcc/ with -fno-exceptions -fno-rtti Michael Matz
2011-11-03 14:26         ` Paolo Bonzini
2011-11-03 14:31           ` Richard Guenther
2011-11-03 15:08             ` Eric Botcazou
2011-11-03 17:46               ` Michael Matz
2011-11-03  9:59 ` Mark objects death at end of scope Richard Guenther
2011-11-03 11:07   ` Michael Matz
2011-11-07 16:05   ` Michael Matz
2011-11-07 22:10     ` Richard Guenther
2011-11-10 23:57     ` Steve Ellcey
2011-11-11 15:32       ` Michael Matz
2011-11-11 16:20     ` Mark objects death@end " Ulrich Weigand
2011-11-11 17:22       ` Michael Matz
2011-11-11 17:45         ` Ulrich Weigand [this message]
2011-11-11 17:45           ` Michael Matz
2011-11-03 10:57 ` Mark objects death at end " Jakub Jelinek
2011-11-03 11:57   ` Michael Matz
2011-11-03 12:47     ` Jakub Jelinek
2011-11-03 13:14       ` Michael Matz
2011-11-04 12:28         ` Jakub Jelinek
2011-11-04 12:45           ` Jakub Jelinek

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=201111111717.pABHHIpL005037@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=matz@suse.de \
    --cc=richard.guenther@gmail.com \
    /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).