Skip to content

Commit 7e5c9cc

Browse files
committed
MDEV-34502 fixup: Do not cripple MSAN
We need to work around deficiencies of Valgrind, and apparently the previous work-around attempts (such as d247d64) do not work anymore, definitely not on recent clang-based compilers. MemorySanitizer should be fine; unfortunately we set HAVE_valgrind for it as well.
1 parent 232d7a5 commit 7e5c9cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

storage/innobase/include/mach0data.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mach_write_to_1(
3838
byte* b, /*!< in: pointer to byte where to store */
3939
ulint n) /*!< in: ulint integer to be stored, >= 0, < 256 */
4040
{
41-
#ifndef HAVE_valgrind
41+
#if !defined HAVE_valgrind || __has_feature(memory_sanitizer)
4242
ut_ad((n & ~0xFFUL) == 0);
4343
#endif
4444

@@ -57,7 +57,7 @@ mach_write_to_2(
5757
byte* b, /*!< in: pointer to two bytes where to store */
5858
ulint n) /*!< in: ulint integer to be stored */
5959
{
60-
#ifndef HAVE_valgrind
60+
#if !defined HAVE_valgrind || __has_feature(memory_sanitizer)
6161
ut_ad((n & ~0xFFFFUL) == 0);
6262
#endif
6363

0 commit comments

Comments
 (0)