#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
extern char **__libc_argv attribute_hidden;
void
__attribute__ ((noreturn)) internal_function
-__fortify_fail (const char *msg)
+__fortify_fail_abort (_Bool do_backtrace, const char *msg)
{
/* The loop is added only to keep gcc happy. */
while (1)
- __libc_message (2, "*** %s ***: %s terminated\n",
+ __libc_message (do_backtrace ? (do_abort | do_backtrace) : do_abort,
+ "*** %s ***: %s terminated\n",
msg, __libc_argv[0] ?: "<unknown>");
}
+
+void
+__attribute__ ((noreturn)) internal_function
+__fortify_fail (const char *msg)
+{
+ __fortify_fail_abort (true, msg);
+}
+
libc_hidden_def (__fortify_fail)
+libc_hidden_def (__fortify_fail_abort)