Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Sep 22, 2025

Backport of #119972 to release/10.0

/cc @AaronRobinsonMSFT

Customer Impact

  • Customer reported
  • Found internally

The UnsafeAccessorAttribute doesn't properly differentiate ambiguity for between the two signatures below. Both are void(*)(void) and in that case the generic calling convention isn't used to indicate distinct signatures.

class C
{
    private static void M() { }
    private static void M<T>() { }
}

Customer reported in #119875.

Regression

  • Yes
  • No

This is regression from .NET 8 because we didn't support generics method with UnsafeAccessorAttribute. When it was added in .NET 9, a test case was missed. A new test was added to validate this scenario.

Testing

A test was added.

Risk

Low.

Handle the case where there is an ambiguous name and signature match, but one is generic and the other isn't.
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-runtime-compilerservices
See info in area-owners.md if you want to be subscribed.

@AaronRobinsonMSFT AaronRobinsonMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 25, 2025
@steveisok steveisok merged commit d51f619 into release/10.0 Sep 25, 2025
110 of 113 checks passed
@steveisok steveisok deleted the backport/pr-119972-to-release/10.0 branch September 25, 2025 23:04
@github-actions github-actions bot locked and limited conversation to collaborators Oct 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants