Skip to content

Conversation

@max-charlamb
Copy link
Member

Resolves #119724

Copy link
Contributor

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 implements proper handling of the special reportInteropMD case in the cDAC stack walking functionality, resolving issue #119724. The implementation adds logic to detect when an InlinedCallFrame should report the actual interop MethodDesc instead of the standard frame MethodDesc.

  • Adds detection logic for the reportInteropMD special case based on frame type, stack walk state, and method characteristics
  • Implements new helper methods to support interop method detection and return address retrieval
  • Updates documentation to explain the special case handling and API differences

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ClrDataFrame.cs Refactors legacy implementation error handling and adds debug assertion for result comparison
StackWalk_1.cs Implements the main reportInteropMD detection and handling logic in GetMethodDescPtr
FrameIterator.cs Adds helper methods for frame type checking and return address retrieval
RuntimeTypeSystem_1.cs Adds IL stub type detection and MDContext argument checking functionality
IRuntimeTypeSystem.cs Adds interface method for checking MDContext arguments
StackWalk.md Documents the special case handling in the API specification
RuntimeTypeSystem.md Documents the new HasMDContextArg method and related enumerations

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

max-charlamb and others added 2 commits September 17, 2025 17:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

@rcj1 rcj1 left a comment

Choose a reason for hiding this comment

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

LGTM besides the one comment

@max-charlamb max-charlamb merged commit 232c74e into dotnet:main Sep 18, 2025
50 checks passed
@max-charlamb max-charlamb deleted the cdac-md-context-arg branch September 18, 2025 23:02
xtqqczze pushed a commit to xtqqczze/dotnet-runtime that referenced this pull request Sep 20, 2025
* implement RuntimeTypeSystem.HasMDContextArg
* update StackWalk.GetMethodDescPtr to account for special case
@github-actions github-actions bot locked and limited conversation to collaborators Oct 19, 2025
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.

[cDAC] IStackWalk.GetMethodDescPtr doesn't support reporting interop MD

2 participants