From c2f173f584f32ed6f644d4c2bc65c4361fcd5583 Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 27 Aug 2023 20:49:18 +0200 Subject: [PATCH] libc: Call __builtin_trap() in abort() if all else fails --- libc/src/stdlib.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libc/src/stdlib.cpp b/libc/src/stdlib.cpp index d58074f5..b19b2a11 100644 --- a/libc/src/stdlib.cpp +++ b/libc/src/stdlib.cpp @@ -117,9 +117,7 @@ extern "C" raise(SIGABRT); - // There is no way we could end up here, unless there is some sort of race condition or the kernel decided to - // change the default action for SIGABRT because it's a Tuesday. - __builtin_unreachable(); + __builtin_trap(); } __noreturn void _Exit(int status)