Skip to content

Update SimSIMD to fix MSan false positives from SIMD intrinsics#98807

Merged
alexey-milovidov merged 1 commit intomasterfrom
fix-simsimd-msan-unpoison
Mar 6, 2026
Merged

Update SimSIMD to fix MSan false positives from SIMD intrinsics#98807
alexey-milovidov merged 1 commit intomasterfrom
fix-simsimd-msan-unpoison

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov commented Mar 5, 2026

Summary

  • Update SimSIMD submodule to include __msan_unpoison calls after every SIMD dispatch macro
  • MSan cannot track initialization through SIMD intrinsics (SVE, NEON, SSE, AVX), causing false-positive "use-of-uninitialized-value" reports in simsimd_cos_f32_sve
  • The fix marks dispatch results as initialized using __msan_unpoison; compiles to no-op in non-MSan builds

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98677&sha=7d4c987f3c650a78b950b264d2676b8b7bc0979e&name_0=PR&name_1=Stress%20test%20%28arm_msan%29

Upstream PR: ashvardanian/NumKong#304

Changelog category

  • CI Fix or Improvement

Changelog entry

...


Note

Medium Risk
Submodule bump in a performance-critical SIMD dependency could subtly affect numerical behavior or performance, though the intended change is MSan-only __msan_unpoison annotations that should be a no-op in normal builds.

Overview
Updates the contrib/SimSIMD submodule to an upstream revision that adds MSan-specific __msan_unpoison calls after SIMD dispatch macros, reducing false-positive "use-of-uninitialized-value" reports (notably on SVE/NEON/SSE/AVX intrinsics).

In non-MSan builds these annotations compile away, so functional impact should be limited to sanitizer behavior while keeping existing SIMD codepaths unchanged.

Written by Cursor Bugbot for commit 1e59133. This will update automatically on new commits. Configure here.

MSan cannot track initialization through SIMD intrinsics (SVE, NEON,
SSE, AVX), causing false-positive "use-of-uninitialized-value" reports
in `simsimd_cos_f32_sve`. Added `__msan_unpoison` calls after every
dispatch macro to mark results as initialized.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98677&sha=7d4c987f3c650a78b950b264d2676b8b7bc0979e&name_0=PR&name_1=Stress%20test%20%28arm_msan%29

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@clickhouse-gh
Copy link
Copy Markdown
Contributor

clickhouse-gh bot commented Mar 5, 2026

Workflow [PR], commit [1e59133]

Summary:

job_name test_name status info comment
Finish Workflow failure
python3 ./ci/jobs/scripts/workflow_hooks/pr_body_check.py failure

@clickhouse-gh clickhouse-gh bot added the submodule changed At least one submodule changed in this PR. label Mar 5, 2026
@Algunenano Algunenano self-assigned this Mar 5, 2026
@alexey-milovidov alexey-milovidov merged commit 5f37f90 into master Mar 6, 2026
147 of 150 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-simsimd-msan-unpoison branch March 6, 2026 05:45
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 6, 2026
rienath added a commit that referenced this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants