Reading the man page of abort(), I see that it deals with situations where SIGABRT is masked (via sigprocmask) or has a handler installed. The override needs to have the same behaviour.
2024-07-18 Bruno Haible <br...@clisp.org> abort-debug: Don't assume that signal SIGABRT is unmasked and unhandled. * lib/abort-debug.c (rpl_abort): At the end, call the original abort function. diff --git a/lib/abort-debug.c b/lib/abort-debug.c index 2457ef07c2..cb78c44dc0 100644 --- a/lib/abort-debug.c +++ b/lib/abort-debug.c @@ -26,13 +26,14 @@ /* rpl_abort (); is equivalent to print_stack_trace (); - original abort (); // i.e. raise (SIGABRT); + original abort (); // essentially raise (SIGABRT); */ void rpl_abort (void) +#undef abort { #if HAVE_LIBBACKTRACE || HAVE_LIBASAN || HAVE_EXECINFO_H print_stack_trace_to (stderr); #endif - raise (SIGABRT); + abort (); }