]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't crap out when malloc_stats is called; instead just have a no-op
authorJulian Seward <jseward@acm.org>
Fri, 16 Nov 2007 22:29:27 +0000 (22:29 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 16 Nov 2007 22:29:27 +0000 (22:29 +0000)
implementation of it.  Fixes #145559.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7168

coregrind/m_replacemalloc/vg_replace_malloc.c

index f6df4e4d386236a11dd99e3c060e5133473fcc70..e9abb31f0fb5c03fad5a704733a3e71f836ca998 100644 (file)
@@ -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 ----------------------*/