Add GCDescs in front of MethodTable to dumps#72658
Conversation
…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.
|
Tagging subscribers to this area: @tommcdon Issue DetailsAdd 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.
|
|
Are there issues filed for any of things this change is fixing? If so we should link them. |
|
The problems addressed by these fixes were found when testing the SOS commands enabled by dotnet/diagnostics#3169 (mainly !dumpruntimetypes) and dotnet/diagnostics#2947 |
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.