-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support invoke of function pointer type arg #90270
Conversation
Tagging subscribers to this area: @dotnet/area-system-reflection Issue Details[verifying tests]
|
a41e446
to
86cb0eb
Compare
src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs
Outdated
Show resolved
Hide resolved
Is this planned to be merged in by RC1 snap? |
I'll hold off on this PR until the Mono function pointer introspection PR is in. |
Thank you. Done! |
The mono changes look ok. |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. (Please check that the tests are passing on native AOT before merging - I have triggered extra-platforms run.)
@@ -838,6 +838,11 @@ private unsafe object ReturnTransform(ref byte byref, bool wrapInTargetInvocatio | |||
Debug.Assert(type.IsPointer); | |||
obj = Pointer.Box((void*)Unsafe.As<byte, IntPtr>(ref byref), type); | |||
} | |||
else if ((_returnTransform & Transform.FunctionPointer) != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this change, a checked build would throw in the else
statement below where it tried to box _returnType
.
Also verified locally with both release and checked runtime build. Did update #90376 based on CI failures. Other failures appear unrelated. |
Addresses the main issue of #85028 which is the inability to invoke a method that has a function pointer type argument for CoreClr. Also adds support to Mono and fixes issue in NativeAot with returning function pointer types.