Skip to content
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

Add GCDescs in front of MethodTable to dumps #72658

Merged
merged 2 commits into from
Jul 22, 2022
Merged

Conversation

mikem8361
Copy link
Member

Add code to MethodTable::EnumMemoryRegion to add the GCDesc block in front of the MethodTable.

Make the DacValidateMethodTable function more bullet proof by DAC'ifing the MethodTable pointer (using PTR_MethodTable). On Windows, SEH can catch the native AV exceptions but on Linux/MacOS this can crash lldb/SOS on invalid MT addresses. This will also help with eestack/dumpstack crashing lldb also.

…Table pointer (using PTR_MethodTable). On Windows,

SEH can catch the native AV exceptions but on Linux/MacOS this can crash lldb/SOS on invalid MT addresses.

This will also help with eestack/dumpstack crashing lldb also.
@ghost
Copy link

ghost commented Jul 22, 2022

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

Add code to MethodTable::EnumMemoryRegion to add the GCDesc block in front of the MethodTable.

Make the DacValidateMethodTable function more bullet proof by DAC'ifing the MethodTable pointer (using PTR_MethodTable). On Windows, SEH can catch the native AV exceptions but on Linux/MacOS this can crash lldb/SOS on invalid MT addresses. This will also help with eestack/dumpstack crashing lldb also.

Author: mikem8361
Assignees: mikem8361
Labels:

area-Diagnostics-coreclr

Milestone: -

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@noahfalk
Copy link
Member

Are there issues filed for any of things this change is fixing? If so we should link them.

@mikem8361
Copy link
Member Author

The problems addressed by these fixes were found when testing the SOS commands enabled by dotnet/diagnostics#3169 (mainly !dumpruntimetypes) and dotnet/diagnostics#2947

@mikem8361 mikem8361 merged commit 20dd6ea into dotnet:main Jul 22, 2022
@mikem8361 mikem8361 deleted the gcdesc branch July 22, 2022 06:08
@ghost ghost locked as resolved and limited conversation to collaborators Aug 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants