Repository navigation
🩹 Disable ASan on macOS 14/15 with LLVM/Clang 22+ - #60
Merged
Merged
Conversation
On macOS 14/15, llvm-toolchain links LLVM 22/23 programs against its bundled libc++, but the ASan runtime links against the system libc++. Both load into the test process, objects from one are freed by the other, and ASan aborts at exit (bad-free in std::locale::~locale).
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.
On macOS 14/15, llvm-toolchain links LLVM 22/23 programs against its bundled
@rpath/libc++.1.dylib, but LLVM's ASan runtime (libclang_rt.asan_osx_dynamic.dylib) links against the system/usr/lib/libc++.1.dylib. Both end up in the test process, and ASan aborts at exit:The tests themselves pass. This broke libhal/v5 CI on
macos-15buildingscatter_spanwith LLVM 23.The existing ASan check now also disables ASan for upstream Clang 22+ on macOS 14/15, exactly where the toolchain bundles libc++. The Clang 20 / macOS 26+ case is unchanged. I ran the check logic over macOS 13.6/14.7/15.5/26/27 with Clang 20/21/22/23 and AppleClang, and it disables ASan only in those two cases.