summaryrefslogtreecommitdiff
path: root/debug/chk_fail.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-11-15 09:47:23 +0000
committerJakub Jelinek <jakub@redhat.com>2004-11-15 09:47:23 +0000
commitb3c20a361d75caf75f670b2fcd64ab8668c16ca5 (patch)
treecac006e13628dcbf5a48cb618417ae708906db89 /debug/chk_fail.c
parent87ffc9aca119436c8530d6605483a49cfb16668e (diff)
Updated to fedora-glibc-20041115T0915
Diffstat (limited to 'debug/chk_fail.c')
-rw-r--r--debug/chk_fail.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/debug/chk_fail.c b/debug/chk_fail.c
index 70ffa9e40f..dc1c3d70b6 100644
--- a/debug/chk_fail.c
+++ b/debug/chk_fail.c
@@ -1,3 +1,4 @@
+
/* Copyright (C) 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -16,27 +17,14 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <errno.h>
+#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <abort-instr.h>
void
__attribute__ ((noreturn))
__chk_fail (void)
{
- while (1)
- {
- const char *text = "*** buffer overflow detected ***\n";
- TEMP_FAILURE_RETRY (write (STDERR_FILENO, text, strlen (text)));
- /* This will leave a nice backtrace. */
- abort ();
-#ifdef ABORT_INSTRUCTION
- ABORT_INSTRUCTION;
-#endif
- _exit (127);
- }
+ __libc_fatal ("*** buffer overflow detected ***\n");
}
libc_hidden_def (__chk_fail)