diff options
author | Roland McGrath <roland@gnu.org> | 2005-07-18 03:12:48 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2005-07-18 03:12:48 +0000 |
commit | f03d23747639ab9d9339ef38462709b8325f2b3b (patch) | |
tree | 301a2212e3eac0c1817835a7cd4fe770f45b1d04 | |
parent | 79e7ba1611c2002e376f972131e705f30142ef68 (diff) |
2005-02-11 Jakub Jelinek <jakub@redhat.com>
[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.
-rw-r--r-- | debug/chk_fail.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/debug/chk_fail.c b/debug/chk_fail.c index dc1c3d70b6..987331bd9d 100644 --- a/debug/chk_fail.c +++ b/debug/chk_fail.c @@ -21,10 +21,15 @@ #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) |