mirror of
https://github.com/fluencelabs/musl
synced 2025-06-18 17:31:38 +00:00
fix crash in pthread_testcancel if pthread_self has not been called
This commit is contained in:
@ -61,7 +61,7 @@ static void cancel_handler(int sig, siginfo_t *si, void *ctx)
|
|||||||
|
|
||||||
void __testcancel()
|
void __testcancel()
|
||||||
{
|
{
|
||||||
pthread_t self = __pthread_self();
|
pthread_t self = pthread_self();
|
||||||
if (self->cancel && !self->canceldisable)
|
if (self->cancel && !self->canceldisable)
|
||||||
__cancel();
|
__cancel();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user