-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[DAC] Properly dereference internal_root_array
#119396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DAC] Properly dereference internal_root_array
#119396
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
/ba-g test failures unrelated to DAC change |
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17588280032 |
* Adds new DumpGCData test to verify bug fixed in dotnet/runtime#119393 * Adds new FindRootsOlderGeneration to verify bug fixed in dotnet/runtime#119396
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