Partially revert PR #125326: revert ComActivator/LicenseInteropProxy changes#125706
Merged
Partially revert PR #125326: revert ComActivator/LicenseInteropProxy changes#125706
Conversation
…changes The [UnmanagedCallersOnly] approach for LicenseInteropProxy was causing heap corruption (STATUS_HEAP_CORRUPTION) under GC stress scenarios. Revert to the original MethodDescCallSite-based approach. Changes: - ComActivator.cs: Restore public static object Create() and remove the unsafe [UnmanagedCallersOnly] static methods for GetCurrentContextInfo and SaveKeyInCurrentContext - corelib.h: Restore original LICENSE_INTEROP_PROXY method signatures (SM_RetObj, IM_RuntimeTypeHandle_RefBool_RefIntPtr_RetVoid, IM_IntPtr_RetVoid) - runtimecallablewrapper.cpp: Restore MethodDescCallSite calls for license interop - metasig.h: Remove added PtrLicenseInteropProxy_* metasig definitions Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [runtime-coreclr] Fix test failure in NETClientLicense
Partially revert PR #125326: revert ComActivator/LicenseInteropProxy changes
Mar 18, 2026
Contributor
|
Tagging subscribers to this area: @dotnet/interop-contrib |
Member
|
/azp run runtime-coreclr gcstress-extra |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Partially reverts PR #125326 for COM licensing activation by restoring GC-safe managed-call patterns for LicenseInteropProxy, addressing heap corruption under GC stress.
Changes:
- Restore
LicenseInteropProxymethod bindings/signatures and remove pointer-based metasigs. - Switch native license interop call sites from
UnmanagedCallersOnlyCallertoMethodDescCallSite+ARG_SLOT. - Revert CoreLib
LicenseInteropProxyback to a managedCreate()factory and remove unsafe[UnmanagedCallersOnly]wrappers.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/coreclr/vm/runtimecallablewrapper.cpp | Replaces UCO pointer calls with MethodDescCallSite invocations for license interop. |
| src/coreclr/vm/metasig.h | Removes metasig entries for pointer-based LicenseInteropProxy UCO signatures. |
| src/coreclr/vm/corelib.h | Restores original method binding signatures for LicenseInteropProxy. |
| src/coreclr/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComActivator.cs | Restores managed Create() and removes unsafe UCO wrappers for licensing methods. |
Member
|
/azp run runtime-coreclr gcstress-extra |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This was referenced Mar 18, 2026
AaronRobinsonMSFT
approved these changes
Mar 19, 2026
Member
|
FYI @am11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #125326 converted
LicenseInteropProxycall sites to use[UnmanagedCallersOnly]with raw managed object pointers (object*,Type*,LicenseInteropProxy*). Under GC stress, it is causing heap corruption (exit code-1073740940/STATUS_HEAP_CORRUPTION).Fixes #125598