cosmopolitan/libc/mem
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
..
_gc_free.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
alg.h Make improvements 2024-09-01 01:27:47 -07:00
aligned_alloc.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
alloca.h Remove some dead code 2023-07-03 02:48:29 -07:00
arraylist.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
arraylist2.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
BUILD.mk Release Cosmopolitan v3.8.0 2024-08-30 20:14:07 -07:00
bulk_free.c Delete ASAN 2024-06-22 05:45:49 -07:00
calloc.c Delete ASAN 2024-06-22 05:45:49 -07:00
critbit0.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
critbit0_allprefixed.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_clear.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
critbit0_contains.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_delete.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_emplace.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_get.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
critbit0_insert.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
free.c Delete ASAN 2024-06-22 05:45:49 -07:00
gc.c Fix greenbean example 2024-07-07 17:52:33 -07:00
gc.h Make cosmo.h work a little better 2024-02-21 16:40:09 -08:00
grow.c Fix regression in package.ape build tool 2024-09-17 02:54:17 -07:00
heapsort.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
internal.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
leaks.c Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
leaks.h Eliminate cyclic locks in runtime 2024-12-16 22:25:12 -08:00
levenshtein.c Fix the build 2024-08-26 16:44:05 -07:00
mallinfo.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
malloc.c Fix issue with ctl::vector constructor 2024-06-30 02:26:38 -07:00
malloc_inspect_all.c Make malloc() go 200x faster 2024-06-05 02:02:14 -07:00
malloc_trim.c Delete ASAN 2024-06-22 05:45:49 -07:00
malloc_usable_size.c Delete ASAN 2024-06-22 05:45:49 -07:00
mallopt.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
mem.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
memalign.c Delete ASAN 2024-06-22 05:45:49 -07:00
mergesort.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
opensort.c Release Cosmopolitan v3.3 2024-02-20 13:27:59 -08:00
posix_memalign.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
putenv.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
pvalloc.c Create variables for page size 2024-07-18 21:16:53 -07:00
qsort.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
radix_sort_int32.c Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
radix_sort_int64.c Rerun clang-format on the repo (#1217) 2024-06-15 16:34:48 -04:00
realloc.c Delete ASAN 2024-06-22 05:45:49 -07:00
realloc_in_place.c Delete ASAN 2024-06-22 05:45:49 -07:00
reallocarray.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
realpath.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
reverse.internal.h Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
setenv.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
shuffle.internal.h Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
sortedints.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
sortedints.internal.h Add dontthrow attribute to most libc functions 2024-01-09 01:26:03 -08:00
strdup.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
strndup.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
tinymalloc.inc Get monorepo fully building on Windows again 2024-09-12 05:07:21 -07:00
valloc.c Create variables for page size 2024-07-18 21:16:53 -07:00
wcsdup.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00