-
Notifications
You must be signed in to change notification settings - Fork 518
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
[.NET/Security] Use [UnmanagedCallersOnly] instead of [MonoPInvokeCallback] for the managed callbacks called from native code. #13296
[.NET/Security] Use [UnmanagedCallersOnly] instead of [MonoPInvokeCallback] for the managed callbacks called from native code. #13296
Conversation
…lback] for the managed callbacks called from native code. Ref xamarin#10470.
{ | ||
var c = (SslConnection) GCHandle.FromIntPtr (connection).Target; | ||
return c.Read (data, ref dataLength); | ||
return c.Read (data, ref System.Runtime.CompilerServices.Unsafe.AsRef<nint> (dataLength)); |
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.
Why the unsafe pointer here? It's possible to use ref nint
in the signature.
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.
@Therzok no, it's not possible to use ref nint
in the signature, because it's not blittable: dotnet/roslyn#57025
❌ [PR Build] Tests failed on Build ❌Tests failed on Build. API diff✅ API Diff from stable View API diffView dotnet API diffView dotnet legacy API diffAPI & Generator diffℹ️ API Diff (from PR only) (please review changes) GitHub pagesResults can be found in the following github pages (it might take some time to publish): Test results6 tests failed, 93 tests passed.Failed tests
Pipeline on Agent XAMBOT-1099.BigSur' |
Test failures are unrelated:
Build is currently broken in main, waiting to merge until that's fixed (#13304). |
Ref #10470.