cosmopolitan/test/libc/thread
Justine Tunney af7bd80430
Eliminate cyclic locks in runtime
This change introduces a new deadlock detector for Cosmo's POSIX threads
implementation. Error check mutexes will now track a DAG of nested locks
and report EDEADLK when a deadlock is theoretically possible. These will
occur rarely, but it's important for production hardening your code. You
don't even need to change your mutexes to use the POSIX error check mode
because `cosmocc -mdbg` will enable error checking on mutexes by default
globally. When cycles are found, an error message showing your demangled
symbols describing the strongly connected component are printed and then
the SIGTRAP is raised, which means you'll also get a backtrace if you're
using ShowCrashReports() too. This new error checker is so low-level and
so pure that it's able to verify the relationships of every libc runtime
lock, including those locks upon which the mutex implementation depends.
2024-12-16 22:25:12 -08:00
..
async_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
BUILD.mk Strongly link glob() into system() and popen() 2024-11-15 20:37:34 -08:00
footek_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
makecontext_test.c Release Cosmopolitan v3.6.0 2024-07-23 03:28:19 -07:00
nsync_test.c Introduce pthread_condattr_setclock() 2024-09-02 23:45:42 -07:00
pthread_atfork_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
pthread_attr_setsigmask_np_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
pthread_barrier_wait_test.c Bring back gc() function 2024-01-08 10:26:28 -08:00
pthread_cancel_deferred_cond_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
pthread_cancel_masked_cond_test.c Improve multithreading 2024-07-21 14:40:45 -07:00
pthread_cancel_masked_read_test.c Improve multithreading 2024-07-21 14:40:45 -07:00
pthread_cancel_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
pthread_cond_signal_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
pthread_cond_timedwait_test.c Introduce pthread_condattr_setclock() 2024-09-02 23:45:42 -07:00
pthread_create_inherit_mask_test.c Improve multithreading 2024-07-21 14:40:45 -07:00
pthread_create_test.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
pthread_detach_test.c Improve multithreading 2024-07-21 14:40:45 -07:00
pthread_exit_test.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
pthread_getunique_np_test.c Make POSIX threads improvements 2024-06-30 15:38:59 -07:00
pthread_key_create_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
pthread_kill_test.c Introduce sigtimedwait() on Windows 2024-09-15 01:18:27 -07:00
pthread_rwlock_rdlock_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
pthread_setname_np_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
sem_open_test.c Bring back gc() function 2024-01-08 10:26:28 -08:00
sem_timedwait_test.c Make realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
setitimer_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
tls_dtor_test.cc vim spells the c++ filetype 'cpp' 2024-04-24 13:56:37 -07:00