-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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 for reflection-invoking methods that take pointers by reference #10842
Comments
@MichalStrehovsky marked future. feel free to change. |
Expected behavior: Once this method returns, the |
This does repro on 5.0 - ExecutionEngineException is thrown. Trying to ignore the exception with a try\catch results in |
@MichalStrehovsky Is this actually blocking a critical scenario? A workaround right now would be to define a delegate with an appropriate signature and to wrap that delegate around the target method. What we want to avoid is spending a bunch of time addressing one-off issues in reflection that very few people will ever realistically run in to. We'd rather prioritize more impactful work items. |
Nope. If I remember correctly, I found this when we were adding |
See also #7430 which is similar but using a binder. |
In v9, this now crashes with |
dotnet/coreclr#17732 added support for reflection-invoking methods that return unmanaged pointers by reference (so e.g.
ref void* Do()
), but methods that get them by-reference as their parameters are still pretty broken (so e.g.void Do(ref void* x)
).For example:
Will crash the runtime with an
ExecutionEngineException
.(Note this behavior is on parity with the desktop CLR, so it has quite likely been this broken for 17 years.)
The text was updated successfully, but these errors were encountered: