Skip to content

Mono: correctly handle new 0x09 ("unmanaged") calling convention in metadata #38480

Description

@lambdageek

In #38357, a new calling convention value is added to function signatures. Mono should not crash when we see this value in assemblies.

The runtime should basically treat it the same as cdecl on non-Windows platforms (and on Windows for .net 5, too).

When the execution engine sees the calli fsig IL instruction, we will need to look for unmanaged in fsig and do a GC transition around the call.

Next, a modopt on the return type of the signature will encode details of the calling convention #34805

Finally, if the unmanaged calling convention modopts have CallConvSuppressGCTransition as one of the options, we can drop the GC transition around the indirect call.

Tasks:

Metadata

Metadata

Labels

area-VM-meta-monotrackingThis issue is tracking the completion of other related issues.

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