Fix MSan use-of-uninitialized-value in SimSIMD SVE functions#101239
Fix MSan use-of-uninitialized-value in SimSIMD SVE functions#101239alexey-milovidov wants to merge 4 commits intomasterfrom
Conversation
Update SimSIMD submodule to include fix for `svmla_*_x` / `svmls_*_x` in SVE accumulator operations. The `_x` (don't-care) variant left inactive lanes undefined, but `svaddv(svptrue, ...)` summed all lanes including those undefined ones. Changed to `_m` (merge) which preserves the accumulator value for inactive lanes. Fixes #101232 https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100177&sha=a7031a78dd031fc0e90fbeebc0c95df386c5c1a7&name_0=PR&name_1=Stress%20test%20%28arm_msan%29 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Workflow [PR], commit [792e196] Summary: ❌
AI ReviewSummaryThis PR updates the ClickHouse Rules
Final Verdict
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Thanks @nikitamikhaylov — agreed, the submodule update fixing the |
|
@groeneai The issue still reproduces. Do you know what's wrong here? |
The previous approach (unpoisoning `*result` after the dispatch wrapper returns in lib.c) did not help because MSan reports the error inside the SVE function body before it returns to the dispatch layer. Add `SIMSIMD_UNPOISON` calls after every `svaddv` scalar reduction inside SVE function implementations. This prevents MSan-tainted values from propagating to normalize functions and result stores. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=101239&sha=a43cadd697dc5f4dbe13fd8481164dfac8be525e&name_0=PR&name_1=Stress%20test%20%28arm_msan%29 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@nikitamikhaylov The PR has never actually built — every CI run fails at Checkout Submodules because the SimSIMD submodule pointer ( The fix commit exists at a different hash — it was likely force-pushed. The correct commit is That commit has the right fix: changes To fix: update the submodule pointer to |
Update SimSIMD submodule to include fix for
svmla_*_x/svmls_*_xin SVE accumulator operations. The_x(don't-care) variant left inactive lanes undefined, butsvaddv(svptrue, ...)summed all lanes including those undefined ones. Changed to_m(merge) which preserves the accumulator value for inactive lanes.Fixes #101232
Contrib PR: ClickHouse/SimSIMD#18
Upstream PR: ashvardanian/NumKong#331
https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100177&sha=a7031a78dd031fc0e90fbeebc0c95df386c5c1a7&name_0=PR&name_1=Stress%20test%20%28arm_msan%29
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes