Skip to content

Mono throws InvalidProgramException on calli+ExplicitThis #113789

Open
@steveharter

Description

@steveharter

While adding support for calli+ExplicitThis for CoreClr, the new tests for Mono are failing with:

System.InvalidProgramException : Invalid IL code in (wrapper dynamic-method) object:GetGuid (object,intptr): IL_0002: calli     0x00000001

The IL is basically:

ldarg.0 // the "this" pointer
ldarg.1 // function pointer to call obtained from methodInfo.MethodHandle.GetFunctionPointer()
calli explicit instance valuetype [System.Private.CoreLib]System.Guid(class object)

Tests affected:

  • System.Reflection.Emit.Tests.DynamicILInfoTests.InstanceBasedFunctionPointer(useExplicitThis: true)
  • System.Reflection.Emit.Tests.AssemblySaveAssemblyBuilderTests.AssemblyWithInstanceBasedFunctionPointer(useExplicitThis: true)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions