I finally worked out how to make abort() conforming when SIGABRT's disposition is under aggressive alteration by other threads, and it's gloriously simple. Especially if you've ever read the (utterly wrong) glibc monstrosity: https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/abort.c;h=9bb97c10552223a65f2a423cb6d5ad184fad5438;hb=HEAD …
-
-
Oddly the glibc abort() does take lock, but for synchronizing its fallback steps against concurrent calls to abort, not against sigaction. And as far as I can tell, the lock is not AS-safe...
-
POSIX Rationale (http://pubs.opengroup.org/onlinepubs/9699919799/functions/abort.html …) clarifies that abort was not required to be AS-safe until C99, and before that POSIX bogusly required non-AS-safe behavior like flushing stdio FILEs...
End of conversation
New conversation -
-
-
It baffles me that whenever Linux system calls can't do something properly, they don't add that feature, but require libc's to do workarounds like locks on system calls. In Sortix, exit signals can be faked and I may have the simplest correct abort.https://gitlab.com/sortix/sortix/blob/master/libc/stdlib/abort.c …
-
Every single of the 135 Sortix system calls has a libc wrapper that directly invokes the system call without doing anything else. This includes all the POSIX functions normally done as system calls, except a few are implemented using more powerful system calls (open -> openat).
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.