Skip to content

Conversation

@davidwrighton
Copy link
Member

  • The HasUnmanagedCallersOnlyAttribute api is... not as accurate as I'd like. See comment in the code

- The HasUnmanagedCallersOnlyAttribute api is... not as accurate as I'd like. See comment in the code
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @BrzVlad, @janvorli, @kg
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a regression in the CoreCLR interpreter by refining the logic for detecting methods with the UnmanagedCallersOnlyAttribute. The fix addresses an issue where HasUnmanagedCallersOnlyAttribute() returns true for IL stubs even though they don't actually have the attribute.

Key Changes:

  • Added an additional check to exclude IL stubs when testing for UnmanagedCallersOnlyAttribute
  • Added a clarifying comment explaining the inaccuracy of the HasUnmanagedCallersOnlyAttribute() API

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BrzVlad BrzVlad requested a review from kotlarmilos December 19, 2025 09:25
@davidwrighton davidwrighton merged commit 78315b9 into dotnet:main Dec 19, 2025
98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants