Skip to content

Fix MSan false positive in SimSIMD capability probing#98699

Merged
alexey-milovidov merged 2 commits intomasterfrom
fix-simsimd-msan
Mar 4, 2026
Merged

Fix MSan false positive in SimSIMD capability probing#98699
alexey-milovidov merged 2 commits intomasterfrom
fix-simsimd-msan

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

Summary

  • Initialize dummy_input buffer to zero in simsimd_capabilities (SimSIMD submodule)
  • The function probes SIMD instructions with an uninitialized buffer and n=0. The SVE implementation of simsimd_cos_f32_sve uses a do { ... } while loop that always executes once. MSan doesn't understand SVE intrinsics and reports use-of-uninitialized-value false positives.

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

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)

🤖 Generated with Claude Code

`simsimd_capabilities` probes SIMD instructions with an uninitialized buffer
and `n=0`. The SVE implementation of `simsimd_cos_f32_sve` uses a
`do { ... } while` loop that always executes once. MSan doesn't understand
SVE intrinsics and reports use-of-uninitialized-value false positives.

Initialize `dummy_input` to zero to silence the report.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=98677&sha=781b465ce87c2bb0bb1f3080b443c4290b383682&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 4, 2026

Workflow [PR], commit [8e22b40]

Summary:

job_name test_name status info comment
Integration tests (amd_tsan, 4/6) failure
test_keeper_java_client/test.py::test_remove_watches FAIL cidb

@clickhouse-gh clickhouse-gh bot added pr-ci submodule changed At least one submodule changed in this PR. labels Mar 4, 2026
Point to the merged ClickHouse/v6.5.1 branch which includes the
initialization of `dummy_input` in `simsimd_capabilities`.

ClickHouse/SimSIMD#10

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Copy link
Copy Markdown
Member Author

@alexey-milovidov alexey-milovidov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexey-milovidov alexey-milovidov self-assigned this Mar 4, 2026
@alexey-milovidov
Copy link
Copy Markdown
Member Author

Needed for #98677

Copy link
Copy Markdown
Member

@Algunenano Algunenano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Upstream PR is created too

@Algunenano Algunenano self-assigned this Mar 4, 2026
@alexey-milovidov alexey-milovidov merged commit c5822ce into master Mar 4, 2026
146 of 149 checks passed
@alexey-milovidov alexey-milovidov deleted the fix-simsimd-msan branch March 4, 2026 16:12
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Mar 4, 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.

3 participants