Skip to content

Fix SOS GCInfo address output with ISOSDacInterface18 - #6188

Merged
davidwrighton merged 1 commit into
dotnet:mainfrom
davidwrighton:fix/sos-interface18-gcinfo-address
Nov 4, 2026
Merged

davidwrighton merged 1 commit into
dotnet:mainfrom
davidwrighton:fix/sos-interface18-gcinfo-address

Conversation

@davidwrighton

Copy link
Copy Markdown
Member

Summary

  • Print the GC info address before choosing the ISOSDacInterface18 or legacy decoding path. Previously, successful Interface18 decoding returned before the address was printed.
  • Preserve the existing address format and legacy decoding behavior, printing the address exactly once.
  • Extend the existing GCInfo test to assert that MethodDesc and instruction-pointer inputs report the same GC info address.

Discovered while working on dotnet/runtime#135821.

Validation

  • Repository build succeeded with system CMake 3.28.3: ./build.sh /p:WarningsNotAsErrors=NU1903. The override retains an existing ILCompiler package advisory as a warning; no package or build configuration changes are included.
  • Focused SOS.Tests.CodeInfoTests.GcInfo_ReportsEncoding test passed for both legacy DAC and cDAC on .NET 11 (2 cases).
  • The available cDAC does not implement ISOSDacInterface18, so these runs verify existing-path compatibility, not Interface18 execution. The fix prints the address from the already-retrieved code header before querying Interface18, ensuring its successful early return cannot omit that output. End-to-end verification with an implementing cDAC remains outstanding.

Print the GC info address before choosing the Interface18 or legacy decoding path so successful Interface18 decoding cannot skip it. Also assert that MethodDesc and IP inputs report the same address.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d6045f2a-f938-4892-bdfa-016e6e58fc35
@davidwrighton
davidwrighton marked this pull request as ready for review November 4, 2026 21:14
@davidwrighton
davidwrighton requested a review from a team as a code owner November 4, 2026 21:14
@davidwrighton

Copy link
Copy Markdown
Member Author

/ba-g the failures are unrelated.

@davidwrighton
davidwrighton merged commit 9de0e67 into dotnet:main Nov 4, 2026
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants