This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/18435] pthread_once hangs when init routine throws an exception
- From: "msebor at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 20 May 2015 00:09:43 +0000
- Subject: [Bug nptl/18435] pthread_once hangs when init routine throws an exception
- Auto-submitted: auto-generated
- References: <bug-18435-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18435
--- Comment #1 from Martin Sebor <msebor at redhat dot com> ---
Created attachment 8326
--> https://sourceware.org/bugzilla/attachment.cgi?id=8326&action=edit
Proposed patch tested on powerpc64le and x86_64.
The attached patch fixes the problem by replacing the problematic
pthread_cleanup_push and pthread_cleanup_pop macros with a cleanup handler.
2015-05-19 Martin Sebor <msebor@redhat.com>
* nptl/pthread_once (CleanupInfo): New struct.
(clear_once_control): Replace...
(cleanup_maybe_clear_once_control): ...with this.
(__pthread_once_slow): Replace calls to pthread_cleanup_push and
pthread_cleanup_pop with a cleanup object of struct CleanupInfo .
* nptl/tst-once5.cc: New test.
--
You are receiving this mail because:
You are on the CC list for the bug.