cosmopolitan/test/posix
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
..
accept4_nonblock_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
accept_inherit_nonblock_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
accept_poll_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
atoi_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
BUILD.mk Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
connect_nonblock_test.c Rewrite Windows connect() 2024-09-12 23:07:52 -07:00
cyclic_mutex_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
exit_async_signal_safety_test.c Demonstrate signal safety of recursive mutexes 2024-07-04 02:47:52 -07:00
file_offset_exec_prog.c Share file offset across execve() on Windows 2024-08-03 17:48:00 -07:00
file_offset_exec_test.c Share file offset across execve() on Windows 2024-08-03 17:48:00 -07:00
file_offset_fork_test.c Share file offset across execve() on Windows 2024-08-03 17:48:00 -07:00
fread3gb_test.c Add some noexcept annotations 2024-06-01 03:19:53 -07:00
iconv_utf8_utf16_test.c Update Musl Libc code 2024-07-30 22:51:29 -07:00
iconv_utf8_utf32_test.c Update Musl Libc code 2024-07-30 22:51:29 -07:00
interprocess_signaling_test.c Introduce interprocess signaling on Windows 2024-09-19 03:02:13 -07:00
listen_timeout_test.c Rewrite Windows connect() 2024-09-12 23:07:52 -07:00
lowest_fd_test.c Fix file descriptor assignment issues on Windows 2024-09-15 22:16:38 -07:00
mask_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
msg_nosignal_test.c Make more Windows socket fixes and improvements 2024-09-18 20:29:42 -07:00
msg_waitall_test.c Make more Windows socket fixes and improvements 2024-09-18 20:29:42 -07:00
mutex_async_signal_safety_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
nonblock_pipe2_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
nonblock_pipe_test.c Rewrite Windows accept() 2024-09-12 04:23:38 -07:00
pending_signal_execve_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
pipe_write_eagain_test.c Write more tests attempting to break windows 2024-09-22 01:21:10 -07:00
printf_return_test.c Make more fixups and quality assurance 2024-10-07 15:29:53 -07:00
pthread_process_shared_test.c Add unit test for process shared conditions 2024-07-22 18:48:54 -07:00
reentrant_signal_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
sa_resethand2_test.c Fix --ftrace on Windows 2024-01-01 00:00:42 -08:00
sa_resethand_test.c Write more tests attempting to break windows 2024-09-22 01:21:10 -07:00
sigchld_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
signal_fight_test.c Write more tests for signal handling 2024-09-21 05:24:56 -07:00
signal_latency_async_test.c Fix an async signal delivery flake on Windows 2024-10-02 04:55:06 -07:00
signal_latency_test.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
signal_test.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
signal_torture_read_test.c Make read() and write() signal handling atomic 2024-09-15 01:18:27 -07:00
socket_fionread_test.c Fix ioctl() and FIONREAD for sockets on Windows 2024-09-13 01:47:33 -07:00
socket_timeout_signal_test.c Reveal another Qemu bug 2024-09-17 01:31:55 -07:00
strtol_test.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
unnamed_semaphore_test.c Speed up unnamed POSIX semaphores 2024-09-13 06:25:27 -07:00
wait2x_test.c Fix ECHILD with WNOHANG on Windows 2024-09-18 23:26:02 -07:00
writev_test.c Slightly optimize iovec on Windows 2024-09-16 21:36:22 -07:00