cosmopolitan/test/libc
Justine Tunney 98c5847727
Fix fork waiter leak in nsync
This change fixes a bug where nsync waiter objects would leak. It'd mean
that long-running programs like runitd would run out of file descriptors
on NetBSD where waiter objects have ksem file descriptors. On other OSes
this bug is mostly harmless since the worst that can happen with a futex
is to leak a little bit of ram. The bug was caused because tib_nsync was
sneaking back in after the finalization code had cleared it. This change
refactors the thread exiting code to handle nsync teardown appropriately
and in making this change I found another issue, which is that user code
which is buggy, and tries to exit without joining joinable threads which
haven't been detached, would result in a deadlock. That doesn't sound so
bad, except the main thread is a joinable thread. So this deadlock would
be triggered in ways that put libc at fault. So we now auto-join threads
and libc will log a warning to --strace when that happens for any thread
2024-12-31 01:30:13 -08:00
..
calls Improve memory manager and signal handling 2024-12-27 01:33:00 -08:00
fmt Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
intrin Fix fork waiter leak in nsync 2024-12-31 01:30:13 -08:00
log Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
mem Make bulk_free() go faster 2024-12-23 20:31:57 -08:00
nexgen32e Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
proc Strongly link glob() into system() and popen() 2024-11-15 20:37:34 -08:00
runtime Make realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
sock Rewrite Windows connect() 2024-09-12 23:07:52 -07:00
stdio Remove old shuffle header 2024-12-30 03:03:32 -08:00
str Make strcasestr() faster 2024-12-12 22:50:20 -08:00
system Allow user to override pthread mutex and cond 2024-12-23 21:57:52 -08:00
thread Fix fork waiter leak in nsync 2024-12-31 01:30:13 -08:00
time Update Musl Libc code 2024-07-30 22:51:29 -07:00
tinymath Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
x Remove old shuffle header 2024-12-30 03:03:32 -08:00
xed Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
BUILD.mk Upgrade to 2022-era LLVM LIBCXX 2024-05-27 02:12:27 -07:00