Skip to content

Fix COM Event ilstub classification#126850

Open
jkoritzinsky wants to merge 1 commit intodotnet:mainfrom
jkoritzinsky:fix-ilstub-flag
Open

Fix COM Event ilstub classification#126850
jkoritzinsky wants to merge 1 commit intodotnet:mainfrom
jkoritzinsky:fix-ilstub-flag

Conversation

@jkoritzinsky
Copy link
Copy Markdown
Member

The stub was incorrectly classified as a P/Invoke, and we have special handling for P/Invokes for GCStress. Correctly classify the stubs as their own kind of stub (Com events).

Fixes #126724

The stub was incorrectly classified as a P/Invoke, and we have special handling for P/Invokes for GCStress. Correctly classify the stubs as their own kind of stub (Com events).
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
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 CoreCLR’s IL stub classification for COM event call stubs so they are no longer treated as generic P/Invoke stubs, avoiding GCStress behavior that is specific to P/Invokes and implicated in the COM Interop test crash.

Changes:

  • Classify COM event call IL stubs as COM stubs by including PINVOKESTUB_FL_COM alongside PINVOKESTUB_FL_COMEVENTCALL.
  • Add a distinct stub name string for the StubCLRToCOMEvent IL stub type to improve identification/diagnostics.

Reviewed changes

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

File Description
src/coreclr/vm/ilstubcache.cpp Adds a distinct name mapping for DynamicMethodDesc::StubCLRToCOMEvent so the newly reachable stub type is identifiable.
src/coreclr/vm/clrtocomcall.cpp Fixes the stub flags used when creating COM event call IL stubs so SF_IsCOMStub recognizes them (enabling correct StubCLRToCOMEvent classification).

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

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Test Failure: Interop/COM/NETClients/Events/NETClientEvents/NETClientEvents.cmd

2 participants