This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug linuxthreads/18710] pthread_join() causes SIGSEGV if thread ==


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]