Skip to content

Convert some COM interop to UCO#125326

Merged
AaronRobinsonMSFT merged 3 commits intodotnet:mainfrom
am11:feature/MDCS-to-UCOA-pattern
Mar 12, 2026
Merged

Convert some COM interop to UCO#125326
AaronRobinsonMSFT merged 3 commits intodotnet:mainfrom
am11:feature/MDCS-to-UCOA-pattern

Conversation

@am11
Copy link
Member

@am11 am11 commented Mar 9, 2026

Contributes to #123864 (subset of group 5)

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Mar 9, 2026
@am11 am11 force-pushed the feature/MDCS-to-UCOA-pattern branch from 67a2fa9 to 0b7f8d4 Compare March 9, 2026 21:50
@am11
Copy link
Member Author

am11 commented Mar 12, 2026

Failure is related to infra (#117164).

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 1f98758 into dotnet:main Mar 12, 2026
104 of 106 checks passed
@am11 am11 deleted the feature/MDCS-to-UCOA-pattern branch March 12, 2026 16:07
Copilot AI pushed a commit that referenced this pull request Mar 13, 2026
Contributes to #123864 (subset
of group 5)
Copilot AI added a commit that referenced this pull request Mar 18, 2026
…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>
jkotas added a commit that referenced this pull request Mar 19, 2026
…changes (#125706)

PR #125326 converted `LicenseInteropProxy` call 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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-coreclr community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants