This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Remove Linuxism from tst-tls-atexit
- From: Zack Weinberg <zackw at panix dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha at sourceware dot org, Roland McGrath <roland at hack dot frob dot com>
- Date: Tue, 14 Jul 2015 13:55:17 -0400
- Subject: Re: [PATCH] Remove Linuxism from tst-tls-atexit
- Authentication-results: sourceware.org; auth=none
- References: <1436883383-6903-1-git-send-email-siddhesh at redhat dot com> <87a8uyabau dot fsf at igel dot home>
On Tue, Jul 14, 2015 at 1:39 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> "Siddhesh Poyarekar" <siddhesh@redhat.com> writes:
>> +static void
>> +segv_handler (int sig)
>> +{
>> + /* All good. */
>> + longjmp (env, 1);
>
> longjmp isn't async-signal-safe.
This usage pattern does appear not to be guaranteed to work in POSIX,
but it is common enough that I don't think we actually need to worry
about it.
It should probably be `sigsetjmp` and `siglongjmp` though, to avoid
leaving SIGSEGV blocked.
zw