Cope with valgrind > 3.2.x.
authorJeremy Allison <jra@samba.org>
Sun, 16 Dec 2007 07:05:37 +0000 (23:05 -0800)
committerJeremy Allison <jra@samba.org>
Sun, 16 Dec 2007 07:05:37 +0000 (23:05 -0800)
Jeremy.

source/lib/clobber.c

index fb3a0dc28159c179fad88d0a3c7da0809dc75ffc..d3a9c59c36bcdbd65faa13410d12c16623ea02e3 100644 (file)
@@ -54,7 +54,11 @@ void clobber_region(const char *fn, unsigned int line, char *dest, size_t len)
         * (This is not redundant with the clobbering above.  The
         * marking might not actually take effect if we're not running
         * under valgrind.) */
+#if defined(VALGRIND_MAKE_MEM_UNDEFINED)
+       VALGRIND_MAKE_MEM_UNDEFINED(dest, len);
+#elif defined(VALGRIND_MAKE_WRITABLE)
        VALGRIND_MAKE_WRITABLE(dest, len);
+#endif
 #endif /* VALGRIND */
 #endif /* DEVELOPER */
 }