This is the mail archive of the
mailing list for the glibc project.
[Bug nptl/19366] New: returning from a thread should disable cancellation
- From: "ninjalj at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 15 Dec 2015 20:11:39 +0000
- Subject: [Bug nptl/19366] New: returning from a thread should disable cancellation
- Auto-submitted: auto-generated
Bug ID: 19366
Summary: returning from a thread should disable cancellation
Assignee: unassigned at sourceware dot org
Reporter: ninjalj at gmail dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Created attachment 8848
demo of thread acting on cancellation request while terminating
Returning from a thread should behave as calling pthread_exit(), and XSH 2.95,
under the epigraph "Thread Cancellation Cleanup Handlers" requires
pthread_exit() to set the cancellation state and type to disabled and deferred,
The attached program is supposed to endlessly loop creating an asynchronously
cancellable thread, and then cancelling and joining it. Instead of that, after
a while, the program exits. This does not happen if the created thread calls
pthread_exit() instead of returning.
Setting the cancellation state and type to disabled and deferred in
nptl/pthread_create.c:START_THREAD_DEFN after returning from/long jumping out
of start_routine fixes this test case. This fix is similar to one in musl
the test program deadlocks in musl prior to that commit.
You are receiving this mail because:
You are on the CC list for the bug.