diff options
author | Rich Felker <dalias@aerifal.cx> | 2019-03-01 22:47:29 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-03-03 12:06:44 -0500 |
commit | 8e43b5613eea0b557a2e91368917a90f4b0e4ab2 (patch) | |
tree | ba010ea02c324ef7363005e8def822fff6aaae09 /src/math/rintl.c | |
parent | 188759bbee057aa94db2bbb7cf7f5855f3b9ab53 (diff) | |
download | musl-8e43b5613eea0b557a2e91368917a90f4b0e4ab2.tar.gz |
synchronize shared library dtor exec against concurrent loads/ctors
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.
Diffstat (limited to 'src/math/rintl.c')
0 files changed, 0 insertions, 0 deletions