This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug linuxthreads/18710] pthread_join() causes SIGSEGV if thread ==
- From: "Ulrich.Windl at rz dot uni-regensburg.de" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 24 Jul 2015 10:32:33 +0000
- Subject: [Bug linuxthreads/18710] pthread_join() causes SIGSEGV if thread ==
- Auto-submitted: auto-generated
- References: <bug-18710-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18710
Ulrich Windl <Ulrich.Windl at rz dot uni-regensburg.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |FIXED
--- Comment #5 from Ulrich Windl <Ulrich.Windl at rz dot uni-regensburg.de> ---
(In reply to Andreas Schwab from comment #4)
> There is no requirement that pthread_cancel detects an invalid thread.
But actually it does, because it causes a SIGSEGV! So an "invalid" pthread_t is
a value that was never written by pthread_create(), but a value ever written is
valid, even when the corresponding thread does no longer exist?
If you compare the semantics of pthread_cancel(3) with that of kill(2), a
program using a PID that never existed will receive SIGSEGV.
The question left is: How do you detect an "invalid thread" from the current
value of a pthread_t? Will an invalid pthread_t or a "valid" pthread_t cause
pthread_cancel() return ESRCH?
--
You are receiving this mail because:
You are on the CC list for the bug.