diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-28 15:56:24 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-28 15:56:24 +0300 |
commit | d59e15bdb96bd24dadaed39bba25fcb0c0bbf8f4 (patch) | |
tree | f371cddd0134ed01964b7b3e051d890b2cec20f1 /include | |
parent | 88157247fc5920ef77cfa96aebd33460d86b3905 (diff) | |
parent | 8358c6f03edb941be488f009c2bd0eb9df47e8c5 (diff) | |
download | mariadb-git-d59e15bdb96bd24dadaed39bba25fcb0c0bbf8f4.tar.gz |
Merge 10.1 into 10.2
Diffstat (limited to 'include')
-rw-r--r-- | include/my_valgrind.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/my_valgrind.h b/include/my_valgrind.h index cd81f109455..7c2bc8aa3d4 100644 --- a/include/my_valgrind.h +++ b/include/my_valgrind.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2010, 2017, MariaDB Corporation. +/* Copyright (C) 2010, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,6 +13,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#ifndef MY_VALGRIND_INCLUDED +#define MY_VALGRIND_INCLUDED + /* clang -> gcc */ #ifndef __has_feature # define __has_feature(x) 0 @@ -33,6 +36,7 @@ # define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len) # define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len) # define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len) +# define REDZONE_SIZE 8 #elif defined(__SANITIZE_ADDRESS__) # include <sanitizer/asan_interface.h> /* How to do manual poisoning: @@ -41,11 +45,13 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */ # define MEM_NOACCESS(a,len) ASAN_POISON_MEMORY_REGION(a,len) # define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0) # define MEM_CHECK_DEFINED(a,len) ((void) 0) +# define REDZONE_SIZE 8 #else # define MEM_UNDEFINED(a,len) ((void) (a), (void) (len)) # define MEM_NOACCESS(a,len) ((void) 0) # define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0) # define MEM_CHECK_DEFINED(a,len) ((void) 0) +# define REDZONE_SIZE 0 #endif /* HAVE_VALGRIND_MEMCHECK_H */ #ifndef DBUG_OFF @@ -56,3 +62,5 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */ #define TRASH_ALLOC(A,B) do { TRASH_FILL(A,B,0xA5); MEM_UNDEFINED(A,B); } while(0) #define TRASH_FREE(A,B) do { TRASH_FILL(A,B,0x8F); MEM_NOACCESS(A,B); } while(0) + +#endif /* MY_VALGRIND_INCLUDED */ |