Skip to content
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

Merged

Conversation

rolfbjarne
Copy link
Member

Ref #10470.

…lback] for the managed callbacks called from native code.

Ref xamarin#10470.
@rolfbjarne rolfbjarne requested a review from dalexsoto as a code owner November 5, 2021 17:47
@rolfbjarne rolfbjarne added the not-notes-worthy Ignore for release notes label Nov 5, 2021
{
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));
Copy link
Contributor

@Therzok Therzok Nov 5, 2021

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.

Copy link
Member Author

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

@vs-mobiletools-engineering-service2
Copy link
Collaborator

❌ [PR Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff
View dotnet API diff
View dotnet legacy API diff
View dotnet iOS-MacCatalayst API diff

API & Generator diff

ℹ️ API Diff (from PR only) (please review changes)
Generator Diff (only version changes)

GitHub pages

Results can be found in the following github pages (it might take some time to publish):

Test results

6 tests failed, 93 tests passed.

Failed tests

  • introspection/Mac Catalyst [dotnet]/Debug [dotnet]: TimedOut (Execution timed out after 1200 seconds.
    No test log file was produced)
  • monotouch-test/Mac [dotnet]/Debug [dotnet]: Failed (Test run failed.
    Tests run: 2539 Passed: 2413 Inconclusive: 10 Failed: 1 Ignored: 125)
  • monotouch-test/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Tests run: 2704 Passed: 2500 Inconclusive: 35 Failed: 1 Ignored: 203)
  • xammac tests/Mac Modern/Debug: Failed (Test run failed.
    Tests run: 2544 Passed: 2423 Inconclusive: 10 Failed: 1 Ignored: 120)
  • xammac tests/Mac Modern/Release: Failed (Test run failed.
    Tests run: 2541 Passed: 2419 Inconclusive: 10 Failed: 1 Ignored: 121)
  • xammac tests/Mac Modern/Release (all optimizations): Failed (Test run failed.
    Tests run: 2541 Passed: 2418 Inconclusive: 10 Failed: 1 Ignored: 122)

Pipeline on Agent XAMBOT-1099.BigSur'
Merge 4ebf783 into 6af32cb

@rolfbjarne
Copy link
Member Author

Test failures are unrelated:

Build is currently broken in main, waiting to merge until that's fixed (#13304).

@rolfbjarne rolfbjarne merged commit e4104ce into xamarin:main Nov 8, 2021
@rolfbjarne rolfbjarne deleted the dotnet-unmanagedcallers-security branch November 8, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-notes-worthy Ignore for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants