Repository navigation
Fix GC hole caused by adrp and add instructions on arm64 - #136412
Conversation
|
Azure Pipelines: Successfully started running 6 pipeline(s). 10 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: @anicka-net, @dotnet/gc |
|
@copilot are there file changes? |
No. The only commit ( |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
@copilot why no files were changed? (trying different model) |
|
@copilot why no files were changed? (trying different model) |
|
@copilot implement the fix |
Co-authored-by: VSadov <8218165+VSadov@users.noreply.github.com>
Implemented in Validation: checked ARM64 JIT build passed; the ARM64 R2R repro’s x0 death moves from Native ARM64 GC-stress execution was unavailable. Secret scan passed; CodeQL was attempted but skipped because its database is too large. |
|
/azp run runtime-coreclr jitstress, runtime-coreclr jitstressregs, runtime-coreclr gcstress0x3-gcstress0xc |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
|
JulieLeeMSFT
left a comment
There was a problem hiding this comment.
LGTM. It fixes a GC hole on ARM64 in fully interruptible code.
If the register destination of an adrp/add address-materialization pair previously held a live object reference, a GC occurring between the two instructions would incorrectly treat the partial page address as a live GC reference, leading to heap corruption or crashes.
It added two calls to the existing emitGCregDeadUpd helper at the precise PC where the register's semantic value changes — mirroring an already-established pattern used for TLS-GD relaxation, so it closes the correctness gap in both the large-address-load and large-constant-load emitter paths.
|
Thanks! |
|
@JulieLeeMSFT - I wonder if we want to backport the fix to net11? The underlying GC hole appears to be pre-existing, not an async regression. Async R2R introduced or exposed a reliable path to the vulnerable emitter sequence, and R2R GC stress revealed it. So I’d classify it as a latent JIT correctness bug newly exposed by async/R2R. |
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.