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.
This commit is contained in:
Roland McGrath 2005-07-18 03:12:48 +00:00
parent 79e7ba1611
commit f03d237476

View File

@ -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)