Disable SVE targets under MemorySanitizer#17
Closed
groeneai wants to merge 1 commit intoClickHouse:ClickHouse/v6.5.15from
Closed
Disable SVE targets under MemorySanitizer#17groeneai wants to merge 1 commit intoClickHouse:ClickHouse/v6.5.15from
groeneai wants to merge 1 commit intoClickHouse:ClickHouse/v6.5.15from
Conversation
MSAN cannot instrument ARM SVE intrinsics (predicated loads, vector arithmetic, reductions). Even `svdupq_n_f32(0.f, ...)` β a literal constant β is flagged as uninitialized because MSAN has no SVE-specific shadow propagation. The existing mitigations (zero-initialized probe buffer and SIMSIMD_UNPOISON on results) are insufficient because MSAN reports the error *inside* the SVE kernel, before the dispatch wrapper can unpoison anything. Disable all SVE compilation targets when building with MSAN so SimSIMD falls back to NEON/scalar implementations that MSAN can track correctly. CIDB confirms zero NEON-related MSAN false positives in 90 days. Co-Authored-By: Claude Opus 4.6 <[email protected]>
Closed
1 task
Author
|
cc @rschu1ze β could you review this? Disables SVE compilation targets under MSAN to fix false-positive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MSAN cannot instrument ARM SVE intrinsics (predicated loads, vector arithmetic,
reductions). Even
svdupq_n_f32(0.f, ...)β a literal constant β is flagged asuninitialized because MSAN has no SVE-specific shadow propagation.
The existing mitigations from PRs #14 (zero-initialized probe buffer +
SIMSIMD_UNPOISONon results) are insufficient: MSAN reports the error insidethe SVE kernel during
svld1_f32,svmla_f32_x,svaddv_f32, before controlreturns to the dispatch wrapper where unpoisoning happens.
Fix
Disable all SVE compilation targets (
SIMSIMD_TARGET_SVE,SVE2,SVE_F16,SVE_BF16,SVE_I8) when building with MSAN. SimSIMD automatically falls backto NEON/scalar implementations that MSAN can track correctly.
Placed immediately after the SVE/SVE2 default definitions (line 43) so the
#undef+#define 0overrides take effect before any downstream#if.Evidence
arm_msanfailures on ClickHouse PR #98677, all with identicalsimsimd_cos_f32_svestack trace atspatial.h:818update) were merged, confirming the previous fixes are insufficient for SVE
π€ Generated with Claude Code