mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28:30 +00:00
Implement crash reporting for AARCH64
The ShowCrashReports() feature for aarch64 should work even better than the x86 crash reports. Thanks to the benefit of hindsight these reports should be rock solid reliable and beautiful to read. This change also improves the syscall polyfills for aarch64. Some of the sys_foo() functions have been removed, usually because they're legacy or downright footguns not worth building.
This commit is contained in:
parent
285e8a2348
commit
1f2a5a8fc1
42 changed files with 540 additions and 247 deletions
|
@ -126,8 +126,11 @@ forceinline pureconst bool IsOldStackFrame(int x) {
|
|||
/* openbsd uses 4mb stack by default */
|
||||
/* freebsd uses 512mb stack by default */
|
||||
/* most systems use 8mb stack by default */
|
||||
intptr_t old = ROUNDDOWN(__oldstack, GetStackSize());
|
||||
return (old >> 16) <= x && x <= ((old + (GetStackSize() - FRAMESIZE)) >> 16);
|
||||
size_t foss_stack_size = 4ul * 1024 * 1024;
|
||||
uintptr_t top = ROUNDUP(__oldstack, FRAMESIZE);
|
||||
uintptr_t bot = top - foss_stack_size;
|
||||
uintptr_t old = ROUNDDOWN(__oldstack, foss_stack_size);
|
||||
return (int)(bot >> 16) <= x && x <= (int)((top >> 16) - 1);
|
||||
}
|
||||
|
||||
forceinline pureconst bool IsFixedFrame(int x) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue