mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Merge pull request #10801 from ClickHouse/fix-msan-report-token
Fix (false) MSan report in MergeTreeIndexFullText
This commit is contained in:
commit
1aba7e45f9
@ -14,6 +14,7 @@
|
|||||||
#include <Parsers/ASTIdentifier.h>
|
#include <Parsers/ASTIdentifier.h>
|
||||||
#include <Parsers/ASTLiteral.h>
|
#include <Parsers/ASTLiteral.h>
|
||||||
#include <Parsers/ASTSubquery.h>
|
#include <Parsers/ASTSubquery.h>
|
||||||
|
#include <Core/Defines.h>
|
||||||
|
|
||||||
#include <Poco/Logger.h>
|
#include <Poco/Logger.h>
|
||||||
|
|
||||||
@ -617,7 +618,7 @@ bool SplitTokenExtractor::next(const char * data, size_t len, size_t * pos, size
|
|||||||
|
|
||||||
while (*pos < len)
|
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.
|
// NOTE: we assume that `data` string is padded from the right with 15 bytes.
|
||||||
const __m128i haystack = _mm_loadu_si128(reinterpret_cast<const __m128i *>(data + *pos));
|
const __m128i haystack = _mm_loadu_si128(reinterpret_cast<const __m128i *>(data + *pos));
|
||||||
const size_t haystack_length = 16;
|
const size_t haystack_length = 16;
|
||||||
@ -691,7 +692,7 @@ bool SplitTokenExtractor::next(const char * data, size_t len, size_t * pos, size
|
|||||||
#endif
|
#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.
|
// Could happen only if string is not padded with zeroes, and we accidentally hopped over end of data.
|
||||||
if (*token_start > len)
|
if (*token_start > len)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user