Skip to content

[26.3] Disable croaring AVX-512 kernels in MSan builds (clang-21 false positive) - #121979

Merged
thevar1able merged 1 commit into
26.3from
croaring-msan-avx512-26.3
Sep 24, 2026
Merged

thevar1able merged 1 commit into
26.3from
croaring-msan-avx512-26.3

Conversation

@thevar1able

@thevar1able thevar1able commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Related: #118917
Related: llvm/llvm-project#148785

croaring v5.1.1 (#118917) was backported to release branches that still build with clang-21. clang-21 MemorySanitizer checks the value of the index operand of the AVX-512 vpermi2var/vpermt2var intrinsics instead of its shadow (fixed upstream in llvm/llvm-project#148785, included in clang-22 but not in 21.x). As a result, avx512_emit_unique16 in croaring (reached from MergeTextIndexesTask::executeStep) reports use-of-uninitialized-value on fully initialized data on runners with AVX-512 VBMI2, and the server dies in MSan stateless jobs.

This PR defines CROARING_COMPILER_SUPPORTS_AVX512=0 for MSan builds only. croaring's isadetection.h respects a predefined value, the same way upstream's ROARING_DISABLE_AVX512 CMake option does. MSan still covers the AVX2 and scalar code paths, and non-MSan builds are unchanged. master and 26.8 build with clang-22 and don't need this change.

Changelog category (leave one):

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

🤖 Generated with Claude Code

Version info

  • Merged into: 26.3.33.141

`croaring` v5.1.1 was backported to release branches that are still built
with clang-21. clang-21 MemorySanitizer checks the value instead of the
shadow of the index operand of AVX-512 `vpermi2var` intrinsics
(llvm/llvm-project#148785, fixed in clang-22), so
`avx512_emit_unique16` (reached from `MergeTextIndexesTask::executeStep`)
triggers `use-of-uninitialized-value` on runners with AVX-512 VBMI2, and
the server dies in every MSan stateless job.

Define `CROARING_COMPILER_SUPPORTS_AVX512=0` for MSan builds; croaring's
`isadetection.h` honours a predefined value. Non-MSan builds are unchanged.

Related: ClickHouse/clickhouse-private#76949

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [BackportPR], commit [9be7935]

Summary: ✅

@clickhouse-gh clickhouse-gh Bot added the comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. label Sep 24, 2026
@evillique evillique self-assigned this Sep 24, 2026
@thevar1able
thevar1able merged commit ea43797 into 26.3 Sep 24, 2026
36 checks passed
@thevar1able
thevar1able deleted the croaring-msan-avx512-26.3 branch September 24, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants