diff --git a/src/Storages/MergeTree/MergeTreeIndexFullText.cpp b/src/Storages/MergeTree/MergeTreeIndexFullText.cpp index 4d1106e7663..61ea5987e76 100644 --- a/src/Storages/MergeTree/MergeTreeIndexFullText.cpp +++ b/src/Storages/MergeTree/MergeTreeIndexFullText.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include @@ -617,7 +618,7 @@ bool SplitTokenExtractor::next(const char * data, size_t len, size_t * pos, size while (*pos < len) { -#if defined(__SSE2__) +#if defined(__SSE2__) && !defined(MEMORY_SANITIZER) /// We read uninitialized bytes and decide on the calcualted mask // NOTE: we assume that `data` string is padded from the right with 15 bytes. const __m128i haystack = _mm_loadu_si128(reinterpret_cast(data + *pos)); const size_t haystack_length = 16; @@ -691,7 +692,7 @@ bool SplitTokenExtractor::next(const char * data, size_t len, size_t * pos, size #endif } -#if defined(__SSE2__) +#if defined(__SSE2__) && !defined(MEMORY_SANITIZER) // Could happen only if string is not padded with zeroes, and we accidentally hopped over end of data. if (*token_start > len) return false;