Repository navigation
[release/11.0] Fix GC hole caused by adrp and add instructions on arm64 - #136945
github-actions[bot] wants to merge 2 commits into
Conversation
- Fixes #136411 --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: VSadov <[email protected]>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
| ins = INS_adrp; | ||
| fmt = IF_DI_1E; | ||
| dst = emitOutputShortAddress(dst, ins, fmt, relPageAddr, addrReg); | ||
| emitGCregDeadUpd(addrReg, dst); |
There was a problem hiding this comment.
It looks odd to me to do this update here, inside emitOutputLJ, but the other update in the caller. Should both be done in the caller or both inside emitOutputLJ?
There was a problem hiding this comment.
Agreed. Moved the LARGEADR update into emitOutputLoadLabel next to the adrp, so both updates live where the adrp is emitted
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
Static inspection supports the ARM64 GC-liveness fix, but its intra-instruction-descriptor boundary changes still need maintainer-confirmed release/11.0 ARM64/R2R GC-stress validation that source-only review could not provide.
No open issues 🎉
What changed in this PR
Backports #136412 to release/11.0 to fix an ARM64 garbage-collection liveness gap in CoreCLR’s JIT emitter, exposed by ReadyToRun GC stress testing.
Changes:
- Marks the destination register as no longer holding a GC reference immediately after
adrpin both affected emission paths. - Adds a comment explaining the timing for the
adrp/addsequence.
Builds and tests were not run.
| File | Description |
|---|---|
src/coreclr/jit/emitarm64.cpp |
Updates register GC liveness after adrp in emitOutputLoadLabel and emitOutputLJ. |
Review effort: Balanced
|
Hi, the code complete date for 11.0.1 (the December 2026 release) is Monday 16 November. Make sure to merge this PR on that date at the latest, or it won't make it into that release. As a reminder, if this is a product change, you also need Tactics approval before merging this PR (test-only or infra-only changes don't require Tactics approval). Happy to help with the merge if needed! |
Backport of #136412 to release/11.0
/cc @VSadov @copilot
Customer Impact
Fount in internal stress testing
Regression
The issue is more general, but the scenario where it was found involves runtime async.
It can affect code that used to not have GC holes before net11.
Testing
The GC stress infrastructure will be supporting R2R code when #135794 merges.
Once that is enabled the hole is detectable via regular GC stress runs. (that is how it was found)
Risk
Low.
The fix follows an already-established pattern used for TLS-GD relaxation