summaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-03-03 13:34:35 +0000
committerJakub Jelinek <jakub@redhat.com>2005-03-03 13:34:35 +0000
commitd0fec8d06cc2234c8114b51f630466eff9d5f841 (patch)
tree223a7fdae69137bd5670e59249442bc6a2db1ad1 /malloc
parent00e4559b612f179492ff3721f86c92498894432f (diff)
Updated to fedora-glibc-20050302T1820
Diffstat (limited to 'malloc')
-rw-r--r--malloc/Makefile2
-rw-r--r--malloc/arena.c6
-rw-r--r--malloc/malloc.c7
3 files changed, 9 insertions, 6 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index 0512c49839..45e8f59ab4 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -101,6 +101,8 @@ $(objpfx)memusagestat: $(memusagestat-modules:%=$(objpfx)%.o)
include ../Rules
+CFLAGS-mcheck-init.c = $(PIC-ccflag)
+
$(objpfx)libmcheck.a: $(objpfx)mcheck-init.o
-rm -f $@
$(patsubst %/,cd % &&,$(objpfx)) \
diff --git a/malloc/arena.c b/malloc/arena.c
index 026f2c7822..8202aaf01b 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>, 2001.
@@ -20,6 +20,8 @@
/* $Id$ */
+#include <stdbool.h>
+
/* Compile-time constants. */
#define HEAP_MIN_SIZE (32*1024)
@@ -353,8 +355,6 @@ libc_hidden_proto (_dl_open_hook);
# endif
# if defined SHARED && defined USE_TLS && !USE___THREAD
-# include <stdbool.h>
-
/* This is called by __pthread_initialize_minimal when it needs to use
malloc to set up the TLS state. We cannot do the full work of
ptmalloc_init (below) until __pthread_initialize_minimal has finished,
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 4d2169bf78..5c9e77e9ec 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -5513,7 +5513,9 @@ extern char **__libc_argv attribute_hidden;
static void
malloc_printerr(int action, const char *str, void *ptr)
{
- if (action & 1)
+ if ((action & 5) == 5)
+ __libc_message (action & 2, "%s\n", str);
+ else if (action & 1)
{
char buf[2 * sizeof (uintptr_t) + 1];
@@ -5523,8 +5525,7 @@ malloc_printerr(int action, const char *str, void *ptr)
*--cp = '0';
__libc_message (action & 2,
- action & 4
- ? "%s\n" : "*** glibc detected *** %s: %s: 0x%s ***\n",
+ "*** glibc detected *** %s: %s: 0x%s ***\n",
__libc_argv[0] ?: "<unknown>", str, cp);
}
else if (action & 2)