summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-04 21:26:32 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-04 21:57:30 +0100
commitd9916587949ba232297ad908146ae0885a5e3c22 (patch)
tree80ee222bc039c6fa748f49ac50a04b153d5260b6 /Libraries
parent8d04bb4d7b5ea6ce9d19cd97504abfd98798cf39 (diff)
downloadserenity-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.cpp4
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, &params);
-
- abort();
+ syscall(SC_abort);
+ for (;;) { }
}
#endif
}