From 7e5c9ccda55b846328edc44a1e7342c605dcd73d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 29 Jul 2024 15:04:16 +0300 Subject: [PATCH] MDEV-34502 fixup: Do not cripple MSAN We need to work around deficiencies of Valgrind, and apparently the previous work-around attempts (such as d247d64988fb3b5d348e412813593a13f3be91fa) do not work anymore, definitely not on recent clang-based compilers. MemorySanitizer should be fine; unfortunately we set HAVE_valgrind for it as well. --- storage/innobase/include/mach0data.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/innobase/include/mach0data.inl b/storage/innobase/include/mach0data.inl index 94bf4326069..8e95d05c79c 100644 --- a/storage/innobase/include/mach0data.inl +++ b/storage/innobase/include/mach0data.inl @@ -38,7 +38,7 @@ mach_write_to_1( byte* b, /*!< in: pointer to byte where to store */ ulint n) /*!< in: ulint integer to be stored, >= 0, < 256 */ { -#ifndef HAVE_valgrind +#if !defined HAVE_valgrind || __has_feature(memory_sanitizer) ut_ad((n & ~0xFFUL) == 0); #endif @@ -57,7 +57,7 @@ mach_write_to_2( byte* b, /*!< in: pointer to two bytes where to store */ ulint n) /*!< in: ulint integer to be stored */ { -#ifndef HAVE_valgrind +#if !defined HAVE_valgrind || __has_feature(memory_sanitizer) ut_ad((n & ~0xFFFFUL) == 0); #endif