[DAC] Properly dereference internal_root_array#119396
Merged
max-charlamb merged 3 commits intodotnet:mainfrom Sep 9, 2025
Merged
[DAC] Properly dereference internal_root_array#119396max-charlamb merged 3 commits intodotnet:mainfrom
internal_root_array#119396max-charlamb merged 3 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a data access consistency issue in the DAC (Data Access Component) by properly dereferencing the internal_root_array pointer in GetHeapAnalyzeStaticData. The change ensures that both GetHeapAnalyzeStaticData and GetHeapAnalyzeData return the same data format (uint8_t** instead of uint8_t***), which is expected by external tools like ClrMD.
- Adds proper dereferencing of
g_gcDacGlobals->internal_root_arrayto match the expected return type - Ensures consistency between
GetHeapAnalyzeStaticDataandGetHeapAnalyzeDataAPIs - Fixes compatibility with external diagnostic tools that expect uniform data formats
Contributor
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
Open
3 tasks
Member
Author
|
/ba-g test failures unrelated to DAC change |
Member
Author
|
/backport to release/10.0 |
Contributor
|
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17588280032 |
4 tasks
9 tasks
max-charlamb
added a commit
to dotnet/diagnostics
that referenced
this pull request
Sep 26, 2025
* Adds new DumpGCData test to verify bug fixed in dotnet/runtime#119393 * Adds new FindRootsOlderGeneration to verify bug fixed in dotnet/runtime#119396
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Found while working on #119324
GetHeapAnalyzeStaticDatais inconsistent with its pairGetHeapAnalyzeData. The former returns auint8_t***whereas the latter returns auint8_t**. I checked the usage of these APIs in clrmd and it expects both to return the same format.I modified
GetHeapAnalyzeStaticDatato dereference theg_gcDacGlobals->internal_root_arraymatchingGetHeapAnalyzeData.dotnet/diagnostics#5562 adds a test
FindRootsOlderGenerationwhich verifies this behaves correctly. The test fails in the current main branch.Pipeline with fixes: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1143226&view=results