Repository navigation
fix(ffi): the nightly sanitizers run on the arm runner - #921
Conversation
Quest-Claim: e048ff929bf4a260
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — fixes the cause in the harness by building the sanitized glue without outline atomics on aarch64, so the link takes the toolchain's uninstrumented __aarch64_* helpers.
Reviewed changes — the full diff across 6 files.
sanitized_glueflag —ffi/tests/fixtures.rsappends-Ctarget-feature=-outline-atomicstoRUSTFLAGSonly undercfg!(target_arch = "aarch64"), so x86_64 is unchanged.- README note —
ffi/README.mdexplains the workaround in one sentence. - Quest cleanup — deletes
arm-sanitizers.mdand theproofsepic README, and drops the links to them fromquest/m1/README.mdandquest/m1/ffi-export/README.md. A repo grep finds no dangling references to either.
The #906 interaction (it adds loom-hold.md under the deleted epic) is already called out in the PR body as a maintainer decision.
claude-sonnet-5-5 | 𝕏
Merging this PR will degrade performance by 11.27%1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes |

Finishes
quest/m1/ffi-proofs/arm-sanitizers.md: the nightly'sffi-sanitizejob onubuntu-24.04-armpasses.Cause
Not the suspects the quest named. The runner already has
vm.mmap_rnd_bits = 28, and the clang/compiler-rt mismatch was not it either (a clang 23 shell still crashed).gdbon the failingapi-cgave the backtrace:On aarch64 the sanitizer runtimes use outline atomics: their own atomics call
__aarch64_*helpers.-Zbuild-std -Zsanitizer=...buildscompiler_builtinsinstrumented, and the link takes its__aarch64_*over the toolchain's. Its helper readsHAVE_LSE_ATOMICSthrough a shadow check, before__asan_init/__tsan_inithas mapped the shadow, so the first program run segfaults with no output (TraceSwitchPartwith a null thread state under TSan). x86_64 has no such helpers, hence only arm failed.Fix
sanitized_glue(ffi/tests/fixtures.rs) adds-Ctarget-feature=-outline-atomicson aarch64 hosts.compiler_builtinsthen defines no__aarch64_*, so the link takes the toolchain's uninstrumented ones. Checked by cross-building for aarch64 locally: the flag takes the module's symbols from 8swp1_acqreferences to 0, while+lseand-Ctarget-cpu=neoverse-n2leave them. It is a no-op on x86_64, where the flag would warn.Also in this PR:
ffi/README.mdsays why in one sentence.proofsepic README, which completes once its last child is gone.quest/m1/README.mdandquest/m1/ffi-export/README.mddrop their links to it.Validation
ffi-sanitizekept (nightly dispatch, run 44765819782):just ffi sanitizepassed all 7 tests (api_asan,api_tsan,api_valgrind,api_swift_tsan,api_go_checked,api_python_debug,api_miri), 560 s. Before the fix: three SIGSEGVs, reproduced on runs 44750635586, 44751584607, 44753208891 (the earlier ones just ran the tests separately, which showedsignal: 11).just cipasses locally on x86_64 Linux. The workflow file andflake.nixare unchanged relative to main (the trimmed workflow and diagnostics were temporary commits, net-reverted; the branch history keeps them).ffi-sanitizewill not run until the next scheduled nightly on main; no dispatch of the full workflow was made.Public API / wire
None. Test harness only.
Decisions (taken without the maintainer, who was away)
sysctl, no x86 runner): nothing in the quest's plan holds, so the leading suspects were dropped.-outline-atomicsover keeping-Zbuild-stdbut uninstrumentingcompiler_builtins, or dropping-Zbuild-std(which would leave std's non-generic code unchecked). It changes aarch64's atomics codegen in the glue under test from outline to inline LL/SC; the sanitizers see no difference in what they check.proofsepic README. Open #906 addsquest/m1/ffi-proofs/loom-hold.mdunder it; whichever lands second needs the README back (a directory underquest/without one failsquest check). Either keep the epic by restoring its README in perf(ffi): Kotlin's checked close in one JNI crossing #906, or move that quest.Follow-ups
None added.
Models
Size: S
Implementer: Claude Code, claude-sonnet-5-5, unknown effort (arm B)
(Written by Claude Sonnet 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 3543971
Base: origin/main at 32e99fe
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1f9bc-7979-7081-a3a3-071f3142d113, round 1Score: 9/10,
No actionable defects were found in the focused aarch64 sanitizer workaround, but builds and tests remain unverified.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Summary by CodeRabbit