Skip to content

Convert some COM interop to UCO - #125326

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

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

Conversation

@am11

@am11am11 commented Mar 9, 2026

Copy link
Copy Markdown
Member

Contributes to #123864 (subset of group 5)

Comment threadsrc/coreclr/vm/clrtocomcall.cpp Outdated
Comment threadsrc/coreclr/vm/runtimecallablewrapper.cpp Outdated
Comment threadsrc/coreclr/vm/runtimecallablewrapper.cpp Outdated
Comment threadsrc/coreclr/vm/runtimecallablewrapper.cpp Outdated
Comment threadsrc/coreclr/vm/runtimecallablewrapper.cpp
Comment threadsrc/coreclr/vm/corelib.h Outdated
@am11
am11force-pushed the feature/MDCS-to-UCOA-pattern branch from 67a2fa9 to 0b7f8d4CompareMarch 9, 2026 21:50
@am11

am11 commented Mar 12, 2026

Copy link
Copy Markdown
MemberAuthor

Failure is related to infra (#117164).

@AaronRobinsonMSFT
AaronRobinsonMSFT merged commit 1f98758 into dotnet:mainMar 12, 2026
104 of 106 checks passed
@am11
am11 deleted the feature/MDCS-to-UCOA-pattern branch March 12, 2026 16:07
CopilotAI pushed a commit that referenced this pull request Mar 13, 2026
Contributes to #123864 (subset
of group 5)
CopilotAI 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>
AaronRobinsonMSFT added a commit to AaronRobinsonMSFT/runtime that referenced this pull request Mar 26, 2026
…eInteropProxy changes (dotnet#125706)"
This reverts commit 3e79783.
This commit also does the following:
- Fix test bug in LicenseTesting.h
- Rewrite BSTRHolder to a simpler form
- Remove layers in the managed site
- Use the BSTR marshaller instead of Marshal class helpers
- Remove unused signatures
AaronRobinsonMSFT added a commit that referenced this pull request Mar 28, 2026
#126141)
…opProxy changes (#125706)"
This reverts commit 3e79783.
This commit also does the following:
- Fix test bug in `LicenseTesting.h`
- Rewrite `BSTRHolder` to a simpler form
- Remove layers in the managed site
- Use the `BSTR` marshaller instead of `Marshal` class helpers
- Remove unused signatures
Contributes to #123864
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Apr 12, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-VM-coreclrcommunity-contributionIndicates 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

@am11@jkoritzinsky@jkotas@AaronRobinsonMSFT