From: Julian Seward Date: Fri, 16 Nov 2007 22:29:27 +0000 (+0000) Subject: Don't crap out when malloc_stats is called; instead just have a no-op X-Git-Tag: svn/VALGRIND_3_3_0~123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0a790693c823f53689e7077588c374f4c2e062f;p=thirdparty%2Fvalgrind.git 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 --- 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 ----------------------*/