diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2021-04-18 08:43:10 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-18 11:11:15 +0200 |
commit | f033416893b097e9f148711c161537db328d02cd (patch) | |
tree | 947bfc71b0fb8c48663a2e625e1a922b87e534b7 /Userland/Libraries/LibC/assert.cpp | |
parent | 33a9b2a3c325e8875e75bd58d64de3463bf7f5d3 (diff) | |
download | serenity-f033416893b097e9f148711c161537db328d02cd.zip |
Kernel+LibC: Clean up how assertions work in the kernel and LibC
This also brings LibC's abort() function closer to the spec.
Diffstat (limited to 'Userland/Libraries/LibC/assert.cpp')
-rw-r--r-- | Userland/Libraries/LibC/assert.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Userland/Libraries/LibC/assert.cpp b/Userland/Libraries/LibC/assert.cpp index 2915d43962..58bcf55c2d 100644 --- a/Userland/Libraries/LibC/assert.cpp +++ b/Userland/Libraries/LibC/assert.cpp @@ -48,13 +48,12 @@ void __assertion_failed(const char* msg) { msg, strlen(msg) }, }; syscall(SC_set_coredump_metadata, ¶ms); - syscall(SC_abort); - for (;;) { } + abort(); } #endif } -void __crash() +void _abort() { asm volatile("ud2"); __builtin_unreachable(); |