Write more runtime tests and fix bugs

This change adds tests for the new memory manager code particularly with
its windows support. Function call tracing now works reliably on Silicon
since our function hooker was missing new Apple self-modifying code APIs

Many tests that were disabled a long time ago on aarch64 are reactivated
by this change, now that arm support is on equal terms with x86. There's
been a lot of places where ftrace could cause deadlocks, which have been
hunted down across all platforms thanks to new tests. A bug in Windows's
kill() function has been identified.
This commit is contained in:
Justine Tunney 2025-01-01 22:25:22 -08:00
parent 0b3c81dd4e
commit f24c854b28
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
45 changed files with 550 additions and 872 deletions

View file

@ -18,8 +18,8 @@
*/
#include "libc/calls/calls.h"
#include "libc/calls/internal.h"
#include "libc/intrin/fds.h"
#include "libc/dce.h"
#include "libc/intrin/fds.h"
#include "libc/intrin/kprintf.h"
#include "libc/nt/winsock.h"
#include "libc/runtime/runtime.h"
@ -141,8 +141,6 @@ TEST(socket, canBeInheritedByForkedWorker) {
WAIT(exit, 0);
}
#ifdef __x86_64__
__attribute__((__constructor__)) static void StdioPro(int argc, char *argv[]) {
if (argc >= 2 && !strcmp(argv[1], "StdioProg")) {
ASSERT_EQ(NULL, getenv("__STDIO_SOCKETS"));
@ -184,5 +182,3 @@ TEST(socket, canBeUsedAsExecutedStdio) {
EXPECT_SYS(0, 0, close(3));
WAIT(exit, 0);
}
#endif /* __x86_64__ */