mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 19:58:30 +00:00
Show crash reports on SIGSYS
This will help make it easier to troubleshoot ABI breakages with on operating systems that, unlike Linux don't have ironclad guarantees to not break userspace.
This commit is contained in:
parent
a4601a24d3
commit
44da16255a
11 changed files with 83 additions and 19 deletions
2
libc/sysv/calls/sys_bogus.s
Normal file
2
libc/sysv/calls/sys_bogus.s
Normal file
|
@ -0,0 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall sys_bogus,0x5005005002500500,globl
|
|
@ -375,6 +375,7 @@ scall io_uring_register 0xfffffffffffff1ab globl
|
|||
#────────────────────────RHEL CLOUD────────────────────────── # ←┬─ red hat terminates community release of enterprise linux circa 2020
|
||||
scall sys_pledge 0xfff06cffffffffff globl # └─ online linux services ban the president of united states of america
|
||||
scall msyscall 0xfff025ffffffffff globl
|
||||
scall sys_bogus 0x5005005002500500 globl
|
||||
|
||||
# The Fifth Bell System Interface, Community Edition
|
||||
# » besiyata dishmaya
|
||||
|
|
|
@ -164,8 +164,17 @@ systemfive_bsdscrub:
|
|||
systemfive_bsd:
|
||||
cmp $0xfff,%ax
|
||||
je systemfive_enosys
|
||||
mov %rcx,%r10 # note: we do not create a stack frame
|
||||
mov %rcx,%r10
|
||||
push %rbx
|
||||
push 32(%rsp)
|
||||
push 24(%rsp)
|
||||
push 16(%rsp)
|
||||
mov %rax,%rbx # save ordinal for SIGSYS crash report
|
||||
syscall # bsd will need arg on stack sometimes
|
||||
pop %rbx
|
||||
pop %rbx
|
||||
pop %rbx
|
||||
pop %rbx
|
||||
jc systemfive_errno # bsd sets carry flag if %rax is errno
|
||||
ret
|
||||
.endfn systemfive_bsd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue