This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] NPTL: Use __libc_fatal in unwind.c.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Thu, 20 Nov 2014 14:00:13 -0800 (PST)
- Subject: [COMMITTED PATCH] NPTL: Use __libc_fatal in unwind.c.
- Authentication-results: sourceware.org; auth=none
Both gratuitous Linuxism and failing to use all the nice fancy abort
handling we already have implemented.
Thanks,
Roland
* nptl/unwind.c (unwind_cleanup): Use __libc_fatal.
--- a/nptl/unwind.c
+++ b/nptl/unwind.c
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <setjmp.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -103,11 +104,7 @@ unwind_cleanup (_Unwind_Reason_Code reason, struct _Unwind_Exception *exc)
{
/* When we get here a C++ catch block didn't rethrow the object. We
cannot handle this case and therefore abort. */
-# define STR_N_LEN(str) str, strlen (str)
- INTERNAL_SYSCALL_DECL (err);
- INTERNAL_SYSCALL (write, err, 3, STDERR_FILENO,
- STR_N_LEN ("FATAL: exception not rethrown\n"));
- abort ();
+ __libc_fatal ("FATAL: exception not rethrown\n");
}
#endif /* have forced unwind */