Repository navigation
Unpoison SVE scalar reductions for MemorySanitizer - #21
Merged
alexey-milovidov merged 1 commit intoApr 6, 2026
Merged
Conversation
LLVM's MSan does not instrument ARM SVE intrinsics — there is zero handling of `aarch64_sve_*` in MemorySanitizer.cpp (as of LLVM 20), only a file-level "FIXME: This sanitizer does not yet handle scalable vectors". This causes false positives when `svaddv` produces scalar results that MSan considers uninitialized. Add `SIMSIMD_UNPOISON` calls after every `svaddv` reduction in SVE function bodies across spatial.h, dot.h, binary.h, and sparse.h. Define the macro in types.h with `__msan_unpoison` when MSan is active. See also: llvm/llvm-project#165028
alexey-milovidov
added a commit
to ClickHouse/ClickHouse
that referenced
this pull request
Apr 6, 2026
Point to the merge commit that includes both the `_x` → `_m` fix and the `SIMSIMD_UNPOISON` fix for SVE scalar reductions. Contrib PR: ClickHouse/SimSIMD#21
1 task
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.
LLVM's MSan does not instrument ARM SVE intrinsics — there is zero handling of
aarch64_sve_*inMemorySanitizer.cpp(as of LLVM 20), only a file-levelFIXME: This sanitizer does not yet handle scalable vectors. This causes false positives whensvaddvproduces scalar results that MSan considers uninitialized.Add
SIMSIMD_UNPOISONcalls after everysvaddvreduction in SVE function bodies acrossspatial.h,dot.h,binary.h, andsparse.h. Define the macro intypes.hwith__msan_unpoisonwhen MSan is active.See also: llvm/llvm-project#165028
Upstream PR: ashvardanian#342