diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-15 11:50:15 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-01-15 12:12:59 +0200 |
commit | 71e9f0d123e201141c80a240d50347ab36ce126f (patch) | |
tree | 32941a418461691e7890175bf99196b25699dfbf /storage/innobase/include/univ.i | |
parent | b4c471099dfd6c94ada59911ada236e6831b5508 (diff) | |
download | mariadb-git-71e9f0d123e201141c80a240d50347ab36ce126f.tar.gz |
MDEV-17797 Add ASAN poisoning for mem_heap_t
The merge commit d833bb65d53b9a4375fa71cc485b4719fdb0ee53 did not
correctly merge the commit 03eb15933da9944e821bc8c787f84de50e823da0.
Closes #948
Diffstat (limited to 'storage/innobase/include/univ.i')
-rw-r--r-- | storage/innobase/include/univ.i | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index a9d886607c0..5027b9cab5e 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -585,12 +585,14 @@ typedef void* os_thread_ret_t; #include "ut0dbg.h" #include "ut0ut.h" #include "db0err.h" +#include <my_valgrind.h> +/* define UNIV macros in terms of my_valgrind.h */ +#define UNIV_MEM_INVALID(addr, size) MEM_UNDEFINED(addr, size) +#define UNIV_MEM_FREE(addr, size) MEM_NOACCESS(addr, size) +#define UNIV_MEM_ALLOC(addr, size) UNIV_MEM_INVALID(addr, size) #ifdef UNIV_DEBUG_VALGRIND # include <valgrind/memcheck.h> # define UNIV_MEM_VALID(addr, size) VALGRIND_MAKE_MEM_DEFINED(addr, size) -# define UNIV_MEM_INVALID(addr, size) VALGRIND_MAKE_MEM_UNDEFINED(addr, size) -# define UNIV_MEM_FREE(addr, size) VALGRIND_MAKE_MEM_NOACCESS(addr, size) -# define UNIV_MEM_ALLOC(addr, size) VALGRIND_MAKE_MEM_UNDEFINED(addr, size) # define UNIV_MEM_DESC(addr, size) VALGRIND_CREATE_BLOCK(addr, size, #addr) # define UNIV_MEM_UNDESC(b) VALGRIND_DISCARD(b) # define UNIV_MEM_ASSERT_RW_LOW(addr, size, should_abort) do { \ @@ -625,9 +627,6 @@ typedef void* os_thread_ret_t; } while (0) #else # define UNIV_MEM_VALID(addr, size) do {} while(0) -# define UNIV_MEM_INVALID(addr, size) do {} while(0) -# define UNIV_MEM_FREE(addr, size) do {} while(0) -# define UNIV_MEM_ALLOC(addr, size) do {} while(0) # define UNIV_MEM_DESC(addr, size) do {} while(0) # define UNIV_MEM_UNDESC(b) do {} while(0) # define UNIV_MEM_ASSERT_RW_LOW(addr, size, should_abort) do {} while(0) |