cosmopolitan/libc/testlib
Justine Tunney 379cd77078
Improve memory manager and signal handling
On Windows, mmap() now chooses addresses transactionally. It reduces the
risk of badness when interacting with the WIN32 memory manager. We don't
throw darts anymore. There is also no more retry limit, since we recover
from mystery maps more gracefully. The subroutine for combining adjacent
maps has been rewritten for clarity. The print maps subroutine is better

This change goes to great lengths to perfect the stack overflow code. On
Windows you can now longjmp() out of a crash signal handler. Guard pages
previously weren't being restored properly by the signal handler. That's
fixed, so on Windows you can now handle a stack overflow multiple times.
Great thought has been put into selecting the perfect SIGSTKSZ constants
so you can save sigaltstack() memory. You can now use kprintf() with 512
bytes of stack available. The guard pages beneath the main stack are now
recorded in the memory manager.

This change fixes getcontext() so it works right with the %rax register.
2024-12-27 01:33:00 -08:00
..
almostequal.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
almostequalf.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
almostequallongdouble.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
aspect.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
bench.h Reduce header complexity 2023-11-28 14:39:42 -08:00
bench.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
benchmark.h Add more tests for strlcpy() 2024-09-13 01:14:35 -07:00
benchrunner.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
binequals.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
blake2b256_tests.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
blake2b256_tests.txt Run all BLAKE2B256 test vectors (#1185) 2024-05-24 10:59:23 -07:00
blocktronics.h Reduce header complexity 2023-11-28 14:39:42 -08:00
blocktronics.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
blocktronics.txt Remove trailing whitespace from all files (#497) 2022-07-20 20:31:16 -07:00
BUILD.mk Make threads faster and more reliable 2024-12-21 22:13:00 -08:00
clearxmmregisters.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
contains.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
endswith.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
exactlyequallongdouble.c Fix UB in gdtoa hexadecimal float scanf and strtod (#1288) 2024-09-14 17:11:04 -07:00
extract.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
ezbench.h Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
ezbenchcontrol.c Make improvements 2024-02-12 10:23:00 -08:00
ezbenchreport.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
ezbenchwarn.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
fastrandomstring.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fixture.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
fixturerunner.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
formatbinaryasglyphs.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
formatbinaryashex.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
formatbool.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
formatfloat.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
formatint.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
formatrange.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
formatstr.c Fix ctype.h and wctype.h 2024-07-21 15:54:17 -07:00
getcore.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
geterrno.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
getinterrupts.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
globals.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
hexequals.c Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
hyperion.h Reduce header complexity 2023-11-28 14:39:42 -08:00
hyperion.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
hyperion.txt Initial import 2020-06-15 07:18:57 -07:00
incrementfailed.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
manystack.c Make threads faster and more reliable 2024-12-21 22:13:00 -08:00
manystack.h Make threads faster and more reliable 2024-12-21 22:13:00 -08:00
memoryexists.c Make realloc() go 100x faster on Linux/NetBSD 2024-07-07 12:40:30 -07:00
moby.h Reduce header complexity 2023-11-28 14:39:42 -08:00
moby.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
moby.txt Make improvements to redbean 2021-07-10 15:19:37 -07:00
polluteregisters.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
runner.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
seterrno.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
shoulddebugbreak.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
showerror.c Get rid of .internal.h convention in LIBC_INTRIN 2024-07-19 19:38:00 -07:00
startswith.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strcaseequals.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strequals.c Apply clang-format update to repo (#1154) 2024-04-25 10:38:00 -07:00
strerror.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
subprocess.h Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
testcase.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
testlib.h Fix UB in gdtoa hexadecimal float scanf and strtod (#1288) 2024-09-14 17:11:04 -07:00
testmain.c Improve memory manager and signal handling 2024-12-27 01:33:00 -08:00
testrunner.c Allow user to override pthread mutex and cond 2024-12-23 21:57:52 -08:00
thunks.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
tmptest.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
trace.c Test rwlock more 2024-12-14 09:40:13 -08:00
trace.h Test rwlock more 2024-12-14 09:40:13 -08:00
viewables.h Reduce header complexity 2023-11-28 14:39:42 -08:00
viewables.S Remove .internal from more header filenames 2024-08-04 12:52:25 -07:00
viewables.txt Do some string library work 2022-08-20 22:17:14 -07:00
waitforexit.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
waitforterm.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
yield.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00