Skip to content

[clr-interp] Fix Open Virtual Delegates#120280

Merged
davidwrighton merged 3 commits intodotnet:mainfrom
davidwrighton:fix_open_virtual_delegates
Oct 1, 2025
Merged

[clr-interp] Fix Open Virtual Delegates#120280
davidwrighton merged 3 commits intodotnet:mainfrom
davidwrighton:fix_open_virtual_delegates

Conversation

@davidwrighton
Copy link
Member

  • Open virtual delegates have an entrypoint which cannot be processed by NonVirtualEntry2MethodDesc. Handle them specially.

- Open virtual delegates have an entrypoint which cannot be processed by NonVirtualEntry2MethodDesc. Handle them specially.
Copilot AI review requested due to automatic review settings September 30, 2025 23:52
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 30, 2025
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 fixes handling of open virtual delegates in the CoreCLR interpreter by adding special case detection and processing for open virtual delegate dispatch scenarios.

  • Adds detection logic to identify when a delegate uses open virtual dispatch
  • Implements proper method resolution for open virtual delegates using COMDelegate::GetMethodDescForOpenVirtualDelegate
  • Updates delegate object reference handling to use addresses consistently

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jkotas jkotas added area-CodeGen-Interpreter-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 1, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

Thank you!

Removed comment about GC invalidation in GetMethodDescOfVirtualizedCode.
@davidwrighton davidwrighton enabled auto-merge (squash) October 1, 2025 17:57
@davidwrighton davidwrighton merged commit a4e0df0 into dotnet:main Oct 1, 2025
98 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 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.

4 participants