mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-09 00:02:17 +03:00
8e43b5613e
previously, going way back, there was simply no synchronization here. a call to exit concurrent with ctor execution from dlopen could cause a dtor to execute concurrently with its corresponding ctor, or could cause dtors for newly-constructed libraries to be skipped. introduce a shutting_down state that blocks further ctor execution, producing the quiescence the dtor execution loop needs to ensure any kind of consistency, and that blocks further calls to dlopen so that a call into dlopen from a dtor cannot deadlock. better approaches to some of this may be possible, but the changes here at least make things safe. |
||
---|---|---|
.. | ||
dlstart.c | ||
dynlink.c |