summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-15 23:05:30 -0800
committerJeremy Allison <jra@samba.org>2007-12-15 23:05:30 -0800
commit0b33d60affc321d549178b78a39e9df910dfe74f (patch)
treea9798ebb3dd2728cef2507d991c967e1b3b0aca9
parentd76b086cc9edf0b9e0b3ac759d0b66e0515d62e5 (diff)
downloadsamba-0b33d60affc321d549178b78a39e9df910dfe74f.tar.gz
samba-0b33d60affc321d549178b78a39e9df910dfe74f.tar.bz2
samba-0b33d60affc321d549178b78a39e9df910dfe74f.zip
Cope with valgrind > 3.2.x.
Jeremy. (This used to be commit e799eb8da6f5e7a2173ba6b8fb040430fd1c6f34)
-rw-r--r--source3/lib/clobber.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/clobber.c b/source3/lib/clobber.c
index b97262a055..e77e786fb5 100644
--- a/source3/lib/clobber.c
+++ b/source3/lib/clobber.c
@@ -53,7 +53,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 */
}