mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 18:58:30 +00:00
Get garbage collector working on aarch64
Garbage collection will now happen on arm64 when a function returns, rather than kicking the can down the road to when the process exits. This change also does some code cleanup and incorporates suggestions
This commit is contained in:
parent
9793d3524f
commit
01fd655097
16 changed files with 144 additions and 323 deletions
|
@ -164,6 +164,7 @@ static bool AppendFileLine(struct Buffer *b, const char *addr2line,
|
|||
|
||||
relegated void __oncrash_arm64(int sig, struct siginfo *si, void *arg) {
|
||||
char buf[10000];
|
||||
ucontext_t *ctx = arg;
|
||||
static _Thread_local bool once;
|
||||
struct Buffer b[1] = {{buf, sizeof(buf)}};
|
||||
b->p[b->i++] = '\n';
|
||||
|
@ -172,7 +173,6 @@ relegated void __oncrash_arm64(int sig, struct siginfo *si, void *arg) {
|
|||
const char *kind;
|
||||
const char *reset;
|
||||
const char *strong;
|
||||
ucontext_t *ctx = arg;
|
||||
char host[64] = "unknown";
|
||||
struct utsname names = {0};
|
||||
once = true;
|
||||
|
@ -320,7 +320,8 @@ relegated void __oncrash_arm64(int sig, struct siginfo *si, void *arg) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
Append(b, "got %G while crashing!\n", sig);
|
||||
Append(b, "got %G while crashing! pc %lx lr %lx\n", sig,
|
||||
ctx->uc_mcontext.pc, ctx->uc_mcontext.regs[30]);
|
||||
}
|
||||
sys_write(2, b->p, MIN(b->i, b->n));
|
||||
__print_maps();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue