summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/my_valgrind.h9
-rw-r--r--storage/maria/ma_pagecache.c4
2 files changed, 6 insertions, 7 deletions
diff --git a/include/my_valgrind.h b/include/my_valgrind.h
index 3f172831e51..2c623a044f4 100644
--- a/include/my_valgrind.h
+++ b/include/my_valgrind.h
@@ -50,13 +50,8 @@ https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning */
# define REDZONE_SIZE 8
#elif __has_feature(memory_sanitizer)
# include <sanitizer/msan_interface.h>
-# if 0 /* FIXME: these reveal lots of failures */
-# define MEM_UNDEFINED(a,len) __msan_allocated_memory(a,len)
-# define MEM_MAKE_DEFINED(a,len) __msan_unpoison(a,len)
-# else
-# define MEM_UNDEFINED(a,len) ((void) 0)
-# define MEM_MAKE_DEFINED(a,len) ((void) 0)
-# endif
+# define MEM_UNDEFINED(a,len) __msan_allocated_memory(a,len)
+# define MEM_MAKE_DEFINED(a,len) __msan_unpoison(a,len)
# define MEM_NOACCESS(a,len) ((void) 0)
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
# define MEM_CHECK_DEFINED(a,len) __msan_check_mem_is_initialized(a,len)
diff --git a/storage/maria/ma_pagecache.c b/storage/maria/ma_pagecache.c
index e08c18fb579..8fa6646048d 100644
--- a/storage/maria/ma_pagecache.c
+++ b/storage/maria/ma_pagecache.c
@@ -681,6 +681,10 @@ static my_bool pagecache_fwrite(PAGECACHE *pagecache,
DBUG_PRINT("error", ("write callback problem"));
DBUG_RETURN(1);
}
+#if __has_feature(memory_sanitizer) /* FIXME: encryption.aria_tiny etc. fail */
+ /* FIXME: ENGINE=Aria occasionally writes uninitialized data */
+ __msan_unpoison(args.page, pagecache->block_size);
+#endif
res= (int)my_pwrite(filedesc->file, args.page, pagecache->block_size,
((my_off_t) pageno << pagecache->shift), flags);
(*filedesc->post_write_hook)(res, &args);