From 480842a20362aff44d3a34f8d9b29c4cc6254ce8 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 5 Jun 2023 18:23:19 +0300 Subject: [PATCH] LibC: abort now prints 'abort()' and exits we used to call assert in abort which then recursively called abort again. --- libc/stdlib.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libc/stdlib.cpp b/libc/stdlib.cpp index 6de113a3..a04c16c6 100644 --- a/libc/stdlib.cpp +++ b/libc/stdlib.cpp @@ -11,7 +11,9 @@ extern "C" void _fini(); void abort(void) { - ASSERT_NOT_REACHED(); + fflush(nullptr); + fprintf(stderr, "abort()\n"); + exit(1); } void exit(int status)