Skip to content

Versioning issue with ComInterop and async variants #129841

Description

@jakobbotsch

We avoid generating calls to async variants of ComInterop functions. However, there is a versioning issue in the following situation:

  1. A call to an interface function is prejitted
  2. The interface itself gets marked as ComInterop
  3. The interface call is run

In that case we end up with a call to the async variant of a ComInterop function. We currently are not able to generate that. There are a few possible fixes:

  • Bring back the async thunk
  • Generate an async version based on the IL from the IL stub emitted for the non-async variant
  • Move these functions to transient IL plan and have an async version generated that way
  • Detect the situation and throw away the R2R codegen

Context: #129747

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions