]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2005-02-11 Jakub Jelinek <jakub@redhat.com>
authorRoland McGrath <roland@gnu.org>
Mon, 18 Jul 2005 03:12:48 +0000 (03:12 +0000)
committerRoland McGrath <roland@gnu.org>
Mon, 18 Jul 2005 03:12:48 +0000 (03:12 +0000)
[BZ #1100]
* debug/chk_fail.c (__chk_fail): Add a while (1) loop around
__libc_message to kill GCC warning about noreturn function returning.
2005-01-26  Ulrich Drepper  <drepper@redhat.com>

[BZ #1100]
* debug/chk_fail.c (__chk_fail): Print program name in final message.

debug/chk_fail.c

index dc1c3d70b6cf2c1921dd6393fb9f83995995f2a9..987331bd9d477a516b1c8647ac88d90ec69c6d38 100644 (file)
 #include <stdlib.h>
 
 
+extern char **__libc_argv attribute_hidden;
+
 void
 __attribute__ ((noreturn))
 __chk_fail (void)
 {
-  __libc_fatal ("*** buffer overflow detected ***\n");
+  /* The loop is added only to keep gcc happy.  */
+  while (1)
+    __libc_message (1, "*** buffer overflow detected ***: %s terminated\n",
+                   __libc_argv[0] ?: "<unknown>");
 }
 libc_hidden_def (__chk_fail)