This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] pthread_once hangs when init routine throws an exception [BZ #18435]
- From: Martin Sebor <msebor at gmail dot com>
- To: Szabolcs Nagy <nsz at port70 dot net>
- Cc: Carlos O'Donell <carlos at redhat dot com>, Martin Sebor <msebor at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Date: Wed, 08 Jul 2015 22:46:01 -0600
- Subject: Re: [PATCH] pthread_once hangs when init routine throws an exception [BZ #18435]
- Authentication-results: sourceware.org; auth=none
- References: <556B7F10 dot 40209 at redhat dot com> <559D4CD6 dot 5070607 at redhat dot com> <559D95F7 dot 902 at gmail dot com> <20150708221339 dot GN32532 at port70 dot net> <559DA9AF dot 8090409 at gmail dot com>
That's only required in C++ code that throws exceptions from
the once function. C callers are not affected (and in my
tests on aarch64 and ppc64le, they're compiled with neither
-fexceptions or -fasynchronous-unwind-tables and succeed).
This includes tst-once3 which you reported as failing so
there must be something more subtle going on.
I'm afraid I need to correct what I said above: tst-once3 does
pass on aarch64 when compiled with the system GCC 4.9.2(*) but
fails on both powerpc64 and powerpc64le, with both GCC 4.8.3 and
5.1.0. The test runs successfully to completion once I compile
it with -fasynchronous-unwind-tables.
The test fails on aarch64 when compiled with GCC 5.1.0 (just
the test alone).
I'm still trying to figure out why I didn't see the failure (or
missed it) it in my testing of the patch on powerpc.
In any case, I'll revert the patch tomorrow and pick it up again
after the 2.22 release.
Sorry for the trouble it has caused!
Martin
PS The system GCC on Fedora 21/aarch64 was configured with
--disable-libunwind-exceptions. I wonder if that's masking
the problem. I'll see if it goes away if I rebuild GCC 5.1
with the same option.