|
From: <sv...@va...> - 2007-11-16 22:29:26
|
Author: sewardj
Date: 2007-11-16 22:29:27 +0000 (Fri, 16 Nov 2007)
New Revision: 7168
Log:
Don't crap out when malloc_stats is called; instead just have a no-op
implementation of it. Fixes #145559.
Modified:
trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
Modified: trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
===================================================================
--- trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2007-11-16 19:39:49 UTC (rev 7167)
+++ trunk/coregrind/m_replacemalloc/vg_replace_malloc.c 2007-11-16 22:29:27 UTC (rev 7168)
@@ -593,11 +593,20 @@
}
PANIC(m_libc_soname, pvalloc);
-PANIC(m_libc_soname, malloc_stats);
PANIC(m_libc_soname, malloc_get_state);
PANIC(m_libc_soname, malloc_set_state);
+#define MALLOC_STATS(soname, fnname) \
+ \
+ void VG_REPLACE_FUNCTION_ZU(soname, fnname) ( void ); \
+ void VG_REPLACE_FUNCTION_ZU(soname, fnname) ( void ) \
+ { \
+ /* Valgrind's malloc_stats implementation does nothing. */ \
+ }
+MALLOC_STATS(m_libc_soname, malloc_stats);
+
+
/*---------------------- mallinfo ----------------------*/
// mi must be static; if it is auto then Memcheck thinks it is
|