From 0c188d5efc452b576c46270e65b9db4746ee9dfe Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 13 May 2019 10:08:42 +0000 Subject: Make TRASH_FREED_MEMORY a cmake option, similar to SAFEMALLOC --- include/my_valgrind.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/my_valgrind.h') diff --git a/include/my_valgrind.h b/include/my_valgrind.h index 575ed46a0ee..e04f1f64ef0 100644 --- a/include/my_valgrind.h +++ b/include/my_valgrind.h @@ -48,7 +48,7 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */ # define MEM_CHECK_DEFINED(a,len) ((void) 0) #endif /* HAVE_VALGRIND_MEMCHECK_H */ -#if !defined(DBUG_OFF) || defined(TRASH_FREED_MEMORY) +#if defined(TRASH_FREED_MEMORY) #define TRASH_FILL(A,B,C) do { const size_t trash_tmp= (B); MEM_UNDEFINED(A, trash_tmp); memset(A, C, trash_tmp); } while (0) #else #define TRASH_FILL(A,B,C) do { MEM_UNDEFINED((A), (B)); } while (0) -- cgit v1.2.1