From f0a790693c823f53689e7077588c374f4c2e062f Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Fri, 16 Nov 2007 22:29:27 +0000 Subject: [PATCH] Don't crap out when malloc_stats is called; instead just have a no-op implementation of it. Fixes #145559. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7168 --- coregrind/m_replacemalloc/vg_replace_malloc.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index f6df4e4d38..e9abb31f0f 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -593,10 +593,19 @@ static void panic(const char *str) } 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 ----------------------*/ -- 2.47.2