[DAC] fix dac_gc_heap marshalling#119393
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue in the DAC (Data Access Component) where the ServerGCInterestingInfoData function was incorrectly marshalling dac_gc_heap data by reading memory sequentially instead of using proper field offsets.
- Replaces direct pointer access with the
LoadGcHeapDatahelper function - Ensures correct data marshalling by using field offsets from
g_gcDacGlobals->gc_heap_field_offsets - Brings consistency with other DAC APIs that marshal
dac_gc_heapstructures
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17564021296 |
|
@max-charlamb an error occurred while backporting to "release/10.0", please check the run log for details! Error: @max-charlamb is not a repo collaborator, backporting is not allowed. If you're a collaborator please make sure your dotnet team membership visibility is set to Public on https://github.com/orgs/dotnet/people?query=max-charlamb |
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/17564098954 |
* 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
This API was giving different data from the cDAC, I manually inspected the data structure in WinDBG and found that the DAC was giving incorrect data.
It looks like this is the only API to marshal a
dac_gc_heapwithoutLoadGcHeapData. I think it was reading the class as if it were laid out sequentially in memory as opposed to using the offsets ing_gcDacGlobals->gc_heap_field_offsets.I modified the API to use
LoadGcHeapDatain the same way as other APIs.Adding test to the diagnostics repo dotnet/diagnostics#5562
diagnostics pipeline with failures on main: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1140784&view=results
runtime-diagnostics leg running with new test: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1140803&view=results