Skip to content

Update SimSIMD to fix MSan false positive with SVE predicated loads#98966

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

Update SimSIMD to fix MSan false positive with SVE predicated loads#98966
alexey-milovidov merged 1 commit intomasterfrom
fix-simsimd-msan

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

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

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Summary

simsimd_capabilities probes SIMD functions with n=0 using a tiny 8-byte dummy buffer. SVE functions use do { } while (i < n) loops that execute once even with n=0, and MSan instruments predicated loads as full-width vector reads. Enlarged the buffer to 256 bytes to cover the widest SVE vector (2048 bits).


Note

Medium Risk
Updates the contrib/SimSIMD submodule, which changes low-level SIMD code paths on ARM and could impact correctness/performance if upstream behavior changed beyond the intended MSan fix.

Overview
Fixes an ARM MSan false positive triggered by SVE predicated loads during SimSIMD capability probing.

This bumps the contrib/SimSIMD dependency to an upstream change that enlarges the dummy probe buffer (from a tiny placeholder to a size that covers the widest SVE vectors), preventing out-of-bounds reads reported by MSan when probing with n=0.

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

`simsimd_capabilities` probes SIMD functions with `n=0` using a tiny
8-byte dummy buffer. SVE functions use `do { } while (i < n)` loops
that execute once even with n=0, and MSan instruments predicated loads
as full-width vector reads. Enlarged the buffer to 256 bytes to cover
the widest SVE vector (2048 bits).

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

Changelog category: CI Fix or Improvement
Changelog entry: Fix MSan false positive in SimSIMD SVE predicated loads.

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

clickhouse-gh bot commented Mar 7, 2026

Workflow [PR], commit [ddbd9c3]

Summary:

@clickhouse-gh clickhouse-gh bot added pr-ci submodule changed At least one submodule changed in this PR. labels Mar 7, 2026
@alexey-milovidov
Copy link
Copy Markdown
Member Author

Merged into #98677 instead.

@alexey-milovidov alexey-milovidov self-assigned this Mar 8, 2026
@alexey-milovidov alexey-milovidov merged commit ce87830 into master Mar 8, 2026
190 of 272 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-simsimd-msan branch March 8, 2026 04:24
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci 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.

2 participants