Repository navigation
Fix Clang CFI failures in libunwind, libcxxabi, LLVM and XRay - #152
Merged
Merged
Conversation
Construct the cursor in its raw buffer, which cfi-unrelated-cast rejects casting first, and call the personality routine, which may have no CFI type (for example Rust's), without the cfi-icall check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Clang emits no CFI type for destructors, so the call cannot be checked by cfi-icall. Keep the pointers mangled with a per-process secret, as glibc does for this list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
It returns memory that holds no T yet, like the libc++ functions marked _LIBCPP_NO_CFI. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The trampolines call the handlers without any check, so keep each pointer on a read-only page that is made writable only while it is set. Co-Authored-By: Claude Opus 5.5 <[email protected]>
lazerg
pushed a commit
to lazerg/ClickHouse
that referenced
this pull request
Nov 17, 2026
`AArch64TargetMachine` constructor writes the process-global `LLT::ExtendedLLT` flag, which raced with `CHJIT` instances created concurrently on other threads (ThreadSanitizer report in `Stress test (arm_tsan)`). The fork now makes the flag a relaxed `std::atomic<bool>`. The update also brings the Clang CFI fixes from the fork (ClickHouse/llvm-project#152). Related: ClickHouse/llvm-project#154 Related: ClickHouse#117346 Related: llvm/llvm-project#219517 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes for building with Clang CFI: construct objects in raw storage instead of casting it first, exempt the few calls whose target cannot have a CFI type (personality routines,
thread_localdestructors, whose pointers are now mangled as glibc does), and keep the XRay handler pointers read-only.Same fixes as #151, for
release-23.x.cc @thevar1able