Repository navigation
Inject sanitizer runtimes into UI test runners - #3149
Merged
Merged
Conversation
The xctestrun runner moves UI test bundles into the XCTRunner app's PlugIns before it looks for the sanitizer runtimes and the Main Thread Checker, but it still looked for them at the bundle's original path. They were never added to DYLD_INSERT_LIBRARIES, so the runner loaded the bundle's Thread Sanitizer runtime through dlopen and aborted with "Interceptors are not working". Look for them next to the test bundle binary, which follows the move. Assisted-by: Claude <noreply@anthropic.com>
louwers
marked this pull request as ready for review
November 20, 2026 23:37
louwers
requested review from
aaronsky,
adincebic,
brentleyjones,
keith and
luispadron
as code owners
November 20, 2026 23:38
Contributor
Author
|
CI fail looks like a flake. |
keith
approved these changes
Nov 20, 2026
keith
enabled auto-merge (squash)
November 20, 2026 23:45
Contributor
Author
|
Thanks! |
louwers
added a commit
to louwers/maplibre-native
that referenced
this pull request
Nov 26, 2026
bazelbuild/rules_apple#3149 is merged but not yet released, so pin rules_apple to its merge commit with a git_override and drop the local patch. Assisted-by: Claude <noreply@anthropic.com>
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.
ios_ui_testwith--features=tsanaborts before any test runs:For UI tests the xctestrun runner moves the test bundle into
<name>-Runner.app/PlugIns, but it then looks forlibclang_rt.*.dylib(andlibMainThreadChecker.dylib) under the bundle's original path$test_tmp_dir/<name>.xctest/Frameworks. Nothing is found there, soDYLD_INSERT_LIBRARIESstays empty and XCTRunner loads the Thread Sanitizer runtime throughdlopenwith the test bundle.This looks for them next to
test_bundle_binaryinstead, which already follows the move. Unit tests are unaffected because their bundle stays where it was.Adds
test_ios_ui_test_pass_tsan, the UI test counterpart oftest_ios_unit_test_pass_asan. I ran it locally with Xcode 27.2 and the iOS 26.4 simulator runtime: it passes with this change and fails without it, with the error above.test_ios_ui_test_passstill passes. To run it here I had to temporarily change the runners'device_type = "iPhone Xs"to"iPhone 17", because the iPhone Xs can't run iOS 26. I didn't include that change. The Main Thread Checker half of the fix isn't covered by a test.Found while turning Thread Sanitizer back on for MapLibre Native's iOS UI tests (maplibre/maplibre-native#5075), which applies this as a patch on rules_apple 5.2.0.
🤖 Generated with Claude Code