2005-01-07 Ulrich Drepper <drepper@redhat.com>
+ * malloc/malloc.c (malloc_printerr): Print program name as part of
+ error message.
+
* misc/sys/cdefs.h (__attribute_warn_unused_result__): Define.
* stdlib/stdlib.h: Make realloc with
__attribute_warn_unused_result__ instead of __wur.
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 1996-2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1996-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>
and Doug Lea <dl@cs.oswego.edu>, 2001.
/* Helper code. */
+extern char **__libc_argv attribute_hidden;
+
static void
malloc_printerr(int action, const char *str, void *ptr)
{
__libc_message (action & 2,
action & 4
- ? "%s\n" : "*** glibc detected *** %s: 0x%s ***\n",
- str, cp);
+ ? "%s\n" : "*** glibc detected *** %s: %s: 0x%s ***\n",
+ __libc_argv[0] ?: "<unknown>", str, cp);
}
else if (action & 2)
abort ();