]> Savannah Git Hosting - gnulib.git/commitdiff
abort-debug: Don't assume that signal SIGABRT is unmasked and unhandled.
authorBruno Haible <bruno@clisp.org>
Thu, 18 Jul 2024 20:45:41 +0000 (22:45 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 18 Jul 2024 20:45:41 +0000 (22:45 +0200)
* lib/abort-debug.c (rpl_abort): At the end, call the original abort
function.

ChangeLog
lib/abort-debug.c

index d1a64b687742589f46754db03a778dfa88c1e24f..833ecd6d80deb5625f5e4fc2e5af1e63c22a9d67 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-07-18  Bruno Haible  <bruno@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.
+
 2024-07-18  Bruno Haible  <bruno@clisp.org>
 
        abort-debug: Document better.
index 2457ef07c29295efb6119e19ef500d22257ad093..cb78c44dc01d720b03b79397123cce75c5b18fb4 100644 (file)
 /*   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 ();
 }