diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-04 21:26:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-04 21:57:30 +0100 |
commit | d9916587949ba232297ad908146ae0885a5e3c22 (patch) | |
tree | 80ee222bc039c6fa748f49ac50a04b153d5260b6 /Libraries | |
parent | 8d04bb4d7b5ea6ce9d19cd97504abfd98798cf39 (diff) | |
download | serenity-d9916587949ba232297ad908146ae0885a5e3c22.zip |
Kernel+LibC: Tidy up assertion failures with a dedicated syscall
This patch adds sys$abort() which immediately crashes the process with
SIGABRT. This makes assertion backtraces a lot nicer by removing all
the gunk that otherwise happens between __assertion_failed() and
actually crashing from the SIGABRT.
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibC/assert.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibC/assert.cpp b/Libraries/LibC/assert.cpp index 45b358639e..7dcd7a5258 100644 --- a/Libraries/LibC/assert.cpp +++ b/Libraries/LibC/assert.cpp @@ -47,8 +47,8 @@ void __assertion_failed(const char* msg) { msg, strlen(msg) }, }; syscall(SC_set_coredump_metadata, ¶ms); - - abort(); + syscall(SC_abort); + for (;;) { } } #endif } |