Skip to content

Fix the thread_local destructor secret on illumos and a CFI failure in make_shared - #155

Merged
thevar1able merged 2 commits into
ClickHouse/release-23.xfrom
cfi-tls-secret-shared-ptr
Nov 16, 2026
Merged

thevar1able merged 2 commits into
ClickHouse/release-23.xfrom
cfi-tls-secret-shared-ptr

Conversation

@Algunenano

Copy link
Copy Markdown
Member

Two fixes: the thread_local destructor secret added in #152 was only initialized on Linux, so the first thread_local destructor aborted on illumos; it now uses getentropy() outside Linux. And __shared_ptr_emplace::__get_elem() lost its _LIBCPP_NO_CFI in the 23.x rewrite, so Clang CFI rejects every make_shared of a polymorphic type.

Algunenano and others added 2 commits November 16, 2026 14:00
…orms

Only Linux initialized it, so the first thread_local destructor aborted on the other platforms that use this implementation, such as illumos. Use getentropy() outside Linux.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
It returns the storage of an object that does not exist yet, and Clang CFI (cfi-unrelated-cast) rejects the cast. The previous implementation was marked _LIBCPP_NO_CFI for the same reason.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@thevar1able
thevar1able merged commit 322b41a into ClickHouse/release-23.x Nov 16, 2026
14 checks passed
thevar1able added a commit to ClickHouse/ClickHouse that referenced this pull request Nov 16, 2026
…ecret on illumos

The pinned `libcxxabi` aborted on the first `thread_local` with a non-trivial
destructor on illumos, because `init_dtor_secret` read the secret only from
`AT_RANDOM` on Linux. It now uses `getentropy` elsewhere. The bump also brings
`_LIBCPP_NO_CFI` back on `__shared_ptr_emplace::__get_elem`.

Related: ClickHouse/llvm-project#155

Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov added a commit to ClickHouse/ClickHouse that referenced this pull request Nov 16, 2026
… fix for illumos

Advances the submodule to the tip of `ClickHouse/release-23.x`, which
initializes the secret with `getentropy` on non-Linux platforms
(ClickHouse/llvm-project#155, ClickHouse/llvm-project#157)
and includes an `InstCombine` fix (ClickHouse/llvm-project#156).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants