未验证 提交 256729b0 编写于 作者: T Tomáš Rylek 提交者: GitHub

Fix handling of unmanaged member function pointers in Crossgen2 (#51089)

Fixes: https://github.com/dotnet/runtime/issues/51007

Without setting found to true we lose the transformed calling
convention (StdcallMemberFunction) and we end up lying to JIT
that getSize is an unmanaged static function pointer so that
JIT doesn't emit proper code for passing the "this" pointer
to the PInvoke.

Thanks

Tomas
上级 2740fbbe
......@@ -654,6 +654,7 @@ private bool TryGetUnmanagedCallingConventionFromModOpt(MethodSignature signatur
if (memberFunctionVariant)
{
callConv = GetMemberFunctionCallingConventionVariant(found ? callConv : (CorInfoCallConvExtension)PlatformDefaultUnmanagedCallingConvention());
found = true;
}
return found;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册