This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Mark objects death@end of scope
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: matz at suse dot de (Michael Matz)
- Cc: richard dot guenther at gmail dot com (Richard Guenther), gcc-patches at gcc dot gnu dot org
- Date: Fri, 11 Nov 2011 18:17:17 +0100 (CET)
- Subject: Re: Mark objects death@end of scope
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