Repository navigation
Fix pre-existing GCInfo decoder correctness issues - #136978
Merged
davidwrighton merged 2 commits intoNov 4, 2026
Merged
Conversation
Correct architecture-specific frame registers, transition scaling and range mapping, indirect live-state payload sizes, ARM64 EnC header parsing, and lazy cDAC outgoing-area decoding. Add regressions using the existing v5 format. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/crossgen-contrib |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the GCInfo decoding corrections.
No open issues 🎉
What changed in this PR
Fixes GCInfo decoding in ReadyToRun tooling and cDAC without changing the encoded format or version.
Changes:
- Corrects architecture-specific register decoding and ARM64 EnC header parsing.
- Fixes transition offset mapping, indirect bitmap size accounting, and cDAC header decoding order.
- Adds 36 ReadyToRun regression cases and five cDAC cases covering the decoder fixes.
| File | Description |
|---|---|
src/native/managed/cdac/tests/UnitTests/GCInfoHeaderTests.cs |
Tests outgoing-area decoding before slot lifetime access across five architectures. |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/GCInfo/GCInfoDecoder.cs |
Decodes the scratch area before returning the header. |
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/GCInfoTypes.cs |
Corrects register mappings and defines the ARM64 EnC fixed-frame encoding base. |
src/coreclr/tools/aot/ILCompiler.Reflection.ReadyToRun/Amd64/GcInfo.cs |
Fixes EnC parsing, bitmap extent tracking, and transition mapping. |
src/coreclr/tools/aot/ILCompiler.ReadyToRun.Tests/GcInfoRegressionTests.cs |
Adds encoded fixtures covering registers, EnC headers, transitions, and indirect bitmaps. |
Review effort: Balanced
davidwrighton
marked this pull request as ready for review
November 4, 2026 20:03
max-charlamb
reviewed
Nov 4, 2026
Add a separate stack-parameter-area decode point for GetHeader while keeping ReversePInvoke aligned with the native decoder. Cover early stopping for generic-context lookups and slim headers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
max-charlamb
approved these changes
Nov 4, 2026
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.
Summary
Fix seven pre-existing GCInfo reader defects without changing the on-disk format, GCInfo/R2R version, encoder, or Wasm-specific behavior:
The PR contains only diagnostic/tooling decoder fixes and regression tests, based on
main. It does not depend on the GCInfo v6 work in #135821.Validation
Added 36 R2R regression cases and seven cDAC cases using the existing GCInfo v5 format. Before applying the original fixes, the new tests demonstrated 28 R2R failures and five cDAC failures. Additional review regressions verify that generic-context lookup does not read the outgoing area and that slim-header decoding does not read the safe-point count.
Both commands below were run successfully on this isolated, main-based branch with zero build warnings or errors:
Result: 179 passed, 0 failed, 15 existing skips, including all 36 new regression cases.
Result: 3,969 passed, 0 failed, 0 skipped, including all seven new regression cases.
The fixtures exercise AMD64, ARM32, ARM64, LoongArch64, and RISC-V64 decoding on Linux x64; they are not native execution tests on those other architectures.
Note
This PR and its description were prepared with GitHub Copilot.