From: Marco Schlumpp Date: Tue, 18 Apr 2023 12:54:52 +0000 (+0200) Subject: Forward abort calls to Unikraft's UK_CRASH X-Git-Tag: RELEASE-0.13.0~12 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=3d279ddb1ab2390f55070d165d66f7aa162871ba;p=unikraft%2Flibs%2Fmusl.git Forward abort calls to Unikraft's UK_CRASH The signals are currently ignored and that causes musl to `exit` the thread, which doesn't cause any output. Therefore, it's very unclear what happened. By calling `UK_CRASH` there is a clear indication that something went wrong. Signed-off-by: Marco Schlumpp Reviewed-by: Eduard Vintilă Reviewed-by: Sergiu Moga Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #41 --- diff --git a/Makefile.uk.musl.exit b/Makefile.uk.musl.exit index e6a381f..93a72b3 100644 --- a/Makefile.uk.musl.exit +++ b/Makefile.uk.musl.exit @@ -11,7 +11,7 @@ LIBMUSL_EXIT_HDRS-y += $(LIBMUSL)/include/stdlib.h LIBMUSL_EXIT_HDRS-y += $(LIBMUSL)/include/syscall.h -LIBMUSL_EXIT_SRCS-y += $(LIBMUSL)/src/exit/abort.c +LIBMUSL_EXIT_SRCS-y += $(LIBMUSL_BASE)/abort.c LIBMUSL_EXIT_SRCS-y += $(LIBMUSL)/src/exit/abort_lock.c LIBMUSL_EXIT_SRCS-y += $(LIBMUSL)/src/exit/assert.c LIBMUSL_EXIT_SRCS-y += $(LIBMUSL)/src/exit/atexit.c diff --git a/abort.c b/abort.c new file mode 100644 index 0000000..e2e187f --- /dev/null +++ b/abort.c @@ -0,0 +1,8 @@ +#include + +#include + +_Noreturn void abort(void) +{ + UK_CRASH("abort called\n"); +} \ No newline at end of file