-
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
Don't block non-blittable pointer types in P/Invokes. #1866
Don't block non-blittable pointer types in P/Invokes. #1866
Conversation
Don't block non-blittable pointer types in P/Invokes. If you're using pointers in interop you're already using unsafe code so we're going to assume you know what you're doing. C# won't let you form a pointer to a reference, so there's no risk of passing an object reference directly to native unless you're writing IL directly. Fixes dotnet/coreclr#27800
Do any tests need to be added or updated? |
Could you please make the same fix in |
I'll add a test with a |
Hello @jkoritzinsky! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
src/coreclr/tests/src/Interop/PInvoke/Generics/GenericsTest.NullableB.cs
Show resolved
Hide resolved
…-nonblittable-pointers-interop
Don't block non-blittable pointer types in P/Invokes. If you're using pointers in interop you're already using unsafe code so we're going to assume you know what you're doing. C# won't let you form a pointer to a reference, so there's no risk of passing an object reference directly to native unless you're writing IL directly.
Fixes dotnet/coreclr#27800