NetBSD-Bugs archive

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

lib/59123: pthread_atfork in a pthread_atfork handler goes awry



>Number:         59123
>Category:       lib
>Synopsis:       pthread_atfork in a pthread_atfork handler goes awry
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 03 15:55:00 +0000 2025
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, ...
>Organization:
The Pthread_Atfork Pthread_Atforkation
>Environment:
>Description:
If a pthread_atfork handler tries to call pthread_atfork, libc will be unhappy.
>How-To-Repeat:
Register a pthread_atfork handler that calls pthread_atfork, and then fork.
>Fix:
extra bookkeeping and synchronization, probably not really that costly at runtime because fork likely dominates it anyway, just mildly annoying to write



Home | Main Index | Thread Index | Old Index