musl/src
Rich Felker d26e0774a5 pthread_exit: don't __vm_wait under thread list lock
the __vm_wait operation can delay forward progress arbitrarily long if
a thread holding the lock is interrupted by a signal. in a worst case
this can deadlock. any critical section holding the thread list lock
must respect lock ordering contracts and must not take any lock which
is not AS-safe.

to fix, move the determination of thread joinable/detached state to
take place before the killlock and thread list lock are taken. this
requires reverting the atomic state transition if we determine that
the exiting thread is the last thread and must call exit, but that's
easy to do since it's a single-threaded context with application
signals blocked.
2020-11-19 16:09:16 -05:00
..
aio convert malloc use under libc-internal locks to use internal allocator 2020-11-11 13:31:50 -05:00
complex fix incorrect results for catanf and catanl with some inputs 2020-02-05 09:40:11 -05:00
conf fix build regression in sysconf for archs with variable page size 2018-09-14 16:25:56 -04:00
crypt update crypt_blowfish to support $2b$ prefix 2020-10-18 12:16:55 -04:00
ctype fix wcwidth wrongly returning 0 for most of planes 4 and up 2020-01-01 20:02:51 -05:00
dirent fail fdopendir for O_PATH file descriptors 2019-02-07 12:51:02 -05:00
env remove redundant pthread struct members repeated for layout purposes 2020-08-27 18:36:45 -04:00
errno improve strerror speed 2020-03-14 21:23:37 -04:00
exit lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
fcntl remove spurious inclusion of libc.h for LFS64 ABI aliases 2018-09-12 14:34:38 -04:00
fenv fix sh fesetround failure to clear old mode 2020-04-18 03:23:40 -04:00
include give libc access to its own malloc even if public malloc is interposed 2020-11-11 11:38:21 -05:00
internal lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
ipc fix corrupt sysvipc timestamps on 32-bit archs with old kernels 2020-03-14 21:23:37 -04:00
ldso lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
legacy remove spurious inclusion of libc.h for LFS64 ABI aliases 2018-09-12 14:34:38 -04:00
linux fix setgroups behavior in multithreaded process 2020-10-27 00:59:54 -04:00
locale lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
malloc lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
math math: new software sqrtl 2020-08-05 23:06:01 -04:00
misc lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
mman revert unwanted and inadvertent change that slipped into mmap.c 2019-12-20 21:27:39 -05:00
mq mq_timedsend, mq_timedreceive: add time64, decouple 32-bit time_t 2019-07-28 17:09:30 -04:00
multibyte fix aliasing-based undefined behavior in mbsrtowcs 2019-10-13 17:21:36 -04:00
network fix missing newline in herror output 2020-09-03 17:30:22 -04:00
passwd fix getgrouplist when nscd reports an empty list 2020-10-14 20:27:12 -04:00
prng lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
process lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
regex fix failure of glob to match broken symlinks under some conditions 2019-08-07 02:38:45 -04:00
sched sched_rr_get_interval: don't assume time_t is 32-bit on 32-bit archs 2019-07-29 12:31:20 -04:00
search new tsearch implementation 2018-09-20 17:57:47 -04:00
select fix regression in select with no timeout 2019-08-07 02:57:53 -04:00
setjmp aarch64: fix setjmp return value 2020-08-12 21:53:25 -04:00
signal lift sigaction abort locking to fix posix_spawn child deadlock 2020-10-24 15:59:40 -04:00
stat fix remaining direct use of stat syscalls outside fstatat.c 2020-02-12 17:34:17 -05:00
stdio lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
stdlib fix undefined behavior in wcsto[ld] family functions 2020-04-24 10:39:17 -04:00
string add optimized aarch64 memcpy and memset 2020-06-26 17:49:51 -04:00
temp remove spurious inclusion of libc.h for LFS64 ABI aliases 2018-09-12 14:34:38 -04:00
termios add tcgetwinsize and tcsetwinsize functions, move struct winsize 2020-08-24 21:31:18 -04:00
thread pthread_exit: don't __vm_wait under thread list lock 2020-11-19 16:09:16 -05:00
time lift child restrictions after multi-threaded fork 2020-11-11 15:55:30 -05:00
unistd refactor setxid return path to use __syscall_ret 2020-10-27 01:15:06 -04:00