Make some systemic improvements

- add vdso dump utility
- tests now log stack usage
- rename g_ftrace to __ftrace
- make internal spinlocks go faster
- add conformant c11 atomics library
- function tracing now logs stack usage
- make function call tracing thread safe
- add -X unsecure (no ssl) mode to redbean
- munmap() has more consistent behavior now
- pacify fsync() calls on python unit tests
- make --strace flag work better in redbean
- start minimizing and documenting compiler flags
This commit is contained in:
Justine Tunney 2022-05-18 16:41:29 -07:00
parent c6bbca55e9
commit 9208c83f7a
141 changed files with 1948 additions and 1411 deletions

View file

@ -70,7 +70,6 @@ TEST(plinko, worksOrPrintsNiceError) {
sigset_t chldmask, savemask;
int i, pid, fdin, wstatus, pfds[2][2];
struct sigaction ignore, saveint, savequit, savepipe;
bzero(buf, sizeof(buf));
ignore.sa_flags = 0;
ignore.sa_handler = SIG_IGN;
EXPECT_EQ(0, sigemptyset(&ignore.sa_mask));
@ -82,8 +81,10 @@ TEST(plinko, worksOrPrintsNiceError) {
EXPECT_EQ(0, sigprocmask(SIG_BLOCK, &chldmask, &savemask));
ASSERT_NE(-1, pipe2(pfds[0], O_CLOEXEC));
ASSERT_NE(-1, pipe2(pfds[1], O_CLOEXEC));
ASSERT_NE(-1, (pid = vfork()));
ASSERT_NE(-1, (pid = fork()));
if (!pid) {
__strace = 0;
__ftrace = 0;
close(0), dup(pfds[0][0]);
close(1), dup(pfds[1][1]);
close(2), dup(pfds[1][1]);
@ -104,7 +105,8 @@ TEST(plinko, worksOrPrintsNiceError) {
EXPECT_NE(-1, close(fdin));
}
EXPECT_NE(-1, close(pfds[0][1]));
EXPECT_NE(-1, (got = read(pfds[1][0], buf, sizeof(buf) - 1)));
bzero(buf, sizeof(buf));
ASSERT_NE(-1, (got = read(pfds[1][0], buf, sizeof(buf) - 1)));
EXPECT_NE(0, got);
while (read(pfds[1][0], drain, sizeof(drain)) > 0) donothing;
EXPECT_NE(-1, close(pfds[1][0]));