diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-28 11:25:45 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-05-28 11:25:45 +0300 |
commit | bf8fe324d25e27eef6a587e385d45a8ce51fee65 (patch) | |
tree | 7b0d981dec21dcbb560543260bf751a59ed32427 /include | |
parent | 626f2a1c170e615c7866c1041746159dc3f709af (diff) | |
parent | 0955462d0aafab01def9c1a5ec131eb641cb9e68 (diff) | |
download | mariadb-git-bf8fe324d25e27eef6a587e385d45a8ce51fee65.tar.gz |
Merge 5.5 into 10.1
Diffstat (limited to 'include')
-rw-r--r-- | include/my_valgrind.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/my_valgrind.h b/include/my_valgrind.h index 6df8f5a772e..ad22f0cad40 100644 --- a/include/my_valgrind.h +++ b/include/my_valgrind.h @@ -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 */ #ifndef DBUG_OFF @@ -55,3 +61,5 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */ #endif #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 */ |