Stack unwinding requirements (was: Re: [PATCH 03/13] posix: Consolidate Linux nanosleep syscall)
Joseph Myers
joseph@codesourcery.com
Mon May 15 11:37:00 GMT 2017
On Mon, 15 May 2017, Florian Weimer wrote:
> Technically, __gcc_personality_v0 is part of the ABI, so there could still be
> user code out there that uses it. And of course, Ada and C++ code which is
> called from glibc code (or which runs from a signal handler that interrupts
> glibc code) could have stack frames with crucial unwinding information when
> thread cancellation happens.
>
> In order to reach those stack frames, the cancellation code needs to unwind
> through glibc code. This could be any code in glibc which calls a function
> which is a cancellation point.
>
> Based on that, I think we should compile all of glibc with unwinding support,
> and considering that asynchronous cancellation can happen through synchronous
> cancellation within signal handlers, we need both -fexceptions *and*
> -fasynchronous-unwind-tables.
See <https://sourceware.org/ml/libc-alpha/2015-10/msg00569.html> and
followups for discussion of the circumstances when those options may be
needed.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list