Clean up more code

- Found some bugs in LLVM compiler-rt library
- The useless LIBC_STUBS package is now deleted
- Improve the overflow checking story even further
- Get chibicc tests working in MODE=dbg mode again
- The libc/isystem/ headers now have correctly named guards
This commit is contained in:
Justine Tunney 2023-06-18 00:55:09 -07:00
parent afc58a8b41
commit d7c79f43ef
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
294 changed files with 912 additions and 1208 deletions

View file

@ -108,7 +108,7 @@ relegated int(AttachDebugger)(intptr_t continuetoaddr) {
"c", NULL,
},
environ);
__builtin_trap();
abort();
}
return pid;
}

View file

@ -35,7 +35,6 @@ LIBC_LOG_A_DIRECTDEPS = \
LIBC_RUNTIME \
LIBC_STDIO \
LIBC_STR \
LIBC_STUBS \
LIBC_SYSV \
LIBC_SYSV_CALLS \
LIBC_TIME \

View file

@ -45,6 +45,7 @@
#include "libc/str/str.h"
#include "libc/thread/thread.h"
#include "libc/thread/tls.h"
#include "libc/str/str.h"
#include "third_party/libcxx/math.h"
#ifdef __x86_64__
@ -222,14 +223,14 @@ relegated void ShowCrashReport(int err, int sig, struct siginfo *si,
p, n,
"\n%serror%s: Uncaught %G (%s) on %s pid %d tid %d\n"
" %s\n"
" %m\n"
" %s\n"
" %s %s %s %s\n",
!__nocolor ? "\e[30;101m" : "", !__nocolor ? "\e[0m" : "", sig,
(ctx && (ctx->uc_mcontext.rsp >= GetStaticStackAddr(0) &&
ctx->uc_mcontext.rsp <= GetStaticStackAddr(0) + APE_GUARDSIZE))
? "Stack Overflow"
: GetSiCodeName(sig, si->si_code),
host, getpid(), gettid(), program_invocation_name, names.sysname,
host, getpid(), gettid(), program_invocation_name, strerror(err), names.sysname,
names.version, names.nodename, names.release);
if (ctx) {
p = ShowGeneralRegisters(p, ctx);
@ -343,7 +344,7 @@ relegated void __oncrash_amd64(int sig, struct siginfo *si, void *arg) {
} else {
// somehow __minicrash() crashed not possible
for (;;) {
__builtin_trap();
abort();
}
}
} else {