JIT: Fix immediate assert when relocs are enabled#124335
Merged
jakobbotsch merged 1 commit intodotnet:mainfrom Feb 12, 2026
Merged
JIT: Fix immediate assert when relocs are enabled#124335jakobbotsch merged 1 commit intodotnet:mainfrom
jakobbotsch merged 1 commit intodotnet:mainfrom
Conversation
When recording relocations we should not try to emit proper immediates for address computations. Those immediates are meaningless since the address isn't the final location, and they can cause asserts due to not being encodable.
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Member
Author
|
PTAL @EgorBo |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes ARM64 JIT label-address emission when relocations are being recorded by avoiding computation/encoding of PC-relative immediates that are not meaningful prior to final code placement (and can trip encoding asserts).
Changes:
- When
id->idIsReloc()is set, emit placeholder0immediates foradrppage delta andaddpage offset instead of attempting to encode the not-yet-final address deltas. - Continue to record the appropriate
ARM64_PAGEBASE_REL21andARM64_PAGEOFFSET_12Arelocations so the loader/linker can patch the real values.
EgorBo
approved these changes
Feb 12, 2026
This was referenced Feb 12, 2026
Open
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.
When recording relocations we should not try to emit proper immediates for address computations. Those immediates are meaningless since the address isn't the final location, and they can cause asserts due to not being encodable.
Fix #124327