[Bug nptl/18435] pthread_once hangs when init routine throws an exception
msebor at redhat dot com
sourceware-bugzilla@sourceware.org
Wed May 20 00:09:00 GMT 2015
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.
More information about the Glibc-bugs
mailing list