Skip to content

Conversation

hoyosjs
Copy link
Member

@hoyosjs hoyosjs commented May 30, 2025

Runtime fix for dotnet/diagnostics#5491

#113907 surfaced a latent bug - we never used the binder for type-lookup-by-name. m_pClasses and friends live in loader heaps, and those are already collected. However, asking for the RCW table by field name in the COM wrappers object field surfaces this issue: while doing dumpobj we request RCW data, and if such access has never happened at runtime through the binder we will fault in the DAC.

@Copilot Copilot AI review requested due to automatic review settings May 30, 2025 23:08
Copy link
Contributor

@Copilot Copilot AI left a 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 ensures the binder is properly enumerated during memory enumeration by invoking EnumMemoryRegions on g_CoreLib, fixing a latent fault when performing dumpobj.

  • Added a CATCH_ALL_EXCEPT_RETHROW_COR_E_OPERATIONCANCELLED block to call EnumMemoryRegions on g_CoreLib.
  • Updated the memory enumeration sequence to include the binder lookup.

Copy link
Contributor

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

@jkotas
Copy link
Member

jkotas commented May 31, 2025

Does this mean that we cannot depend on the static readonly data in the binary to be available when evaluating minidumps under the debugger?

The static arrays like m_classDescriptions point to strings. These strings are not enumerated with this fix. What guarantees that these strings are available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants