This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: exception handling predicament
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: David Miller <davem at davemloft dot net>
- Cc: libc-alpha at sourceware dot org, drepper at gmail dot com, rth at twiddle dot net
- Date: Fri, 19 Aug 2011 19:09:32 +0200
- Subject: Re: exception handling predicament
- References: <20110819.010810.1209537253898782971.davem@davemloft.net>
David Miller <davem@davemloft.net> writes:
> It should also not cover lll_futex_timed_wait() because that's an
> inline asm and we haven't passed -fnon-call-exceptions to GCC.
GCC should probably provide an attribute that marks an asm as throwing.
> The truth is that __cleanup__ doesn't provide the semantics we want.
>
> The cancel signal (and thus since we're in async mode, the unwind) can
> occur at any instruction in this code sequence. Not just instructions
> that "might trap"
>
> They all "might trap." It could even happen during one of the
> __nothrow__ functions we call.
There are only very few functions that are async-cancel safe, so this
cannot happen (i.e. undefined behaviour).
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."