about summary refs log tree commit diff
path: root/ldso
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2017-10-13 23:00:34 -0400
committerRich Felker <dalias@aerifal.cx>2017-10-13 23:00:34 -0400
commitc1e27367a9b26b9baac0f37a12349fc36567c8b6 (patch)
tree88accade820f5d320b504b517b043b951fec583e /ldso
parent907476925fca05f24ebca5fcdc21f1e58ba7b313 (diff)
downloadmusl-c1e27367a9b26b9baac0f37a12349fc36567c8b6.tar.gz
musl-c1e27367a9b26b9baac0f37a12349fc36567c8b6.tar.xz
musl-c1e27367a9b26b9baac0f37a12349fc36567c8b6.zip
fix read-after-free type error in pthread_detach
calling __unlock on t->exitlock is not valid because __unlock reads
the waiters count after making the atomic store that could allow
pthread_exit to continue and unmap the thread's stack and the object t
points to. for now, inline the __unlock logic with an unconditional
futex wake operation so that the waiters count is not needed.

once __lock/__unlock have been made safe for self-synchronized
destruction, we could switch back to using them.
Diffstat (limited to 'ldso')
0 files changed, 0 insertions, 0 deletions