NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/59134: POSIX-1.2024: pthread_setcancelstate must be async-signal-safe



>Number:         59134
>Category:       lib
>Synopsis:       POSIX-1.2024: pthread_setcancelstate must be async-signal-safe
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 05 16:25:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, ...
>Organization:
The PthreadBSD Signalcancellation
>Environment:
>Description:
Under POSIX.1-2024, pthread_setcancelstate is required to be async-signal-safe: https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/pthread_setcanceltype.html

However, ours is not: it takes pt_lock, which is an ordinary mutex, and so it can't be async-signal-safe.
>How-To-Repeat:
try to use pthread_setcancelstate from a signal handler
>Fix:
Yes, please!



Home | Main Index | Thread Index | Old Index