Skip to content

Better generic cycle detection in MethodEntryGenericLookupResult - #129730

Merged
MichalStrehovsky merged 1 commit into
dotnet:mainfrom
MichalStrehovsky:fix129697
Jun 23, 2026
Merged

Better generic cycle detection in MethodEntryGenericLookupResult#129730
MichalStrehovsky merged 1 commit into
dotnet:mainfrom
MichalStrehovsky:fix129697

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

We missed a spot.

Fixes #129697

Test is in #128702.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke, @dotnet/ilc-contrib
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adjusts NativeAOT generic-lookup handling to perform generic cycle detection for method-entry (function pointer) lookups consistently, instead of only doing so on the non-concrete/canonical shadow-path.

Changes:

  • Move DetectGenericCycles(dictionary.Context, instantiatedMethod) to run unconditionally in MethodEntryGenericLookupResult.GetTarget.
  • Remove the now-redundant cycle detection call from the canonical/non-abstract shadow-method branch.
@MichalStrehovsky
MichalStrehovsky merged commit 3500de6 into dotnet:main Jun 23, 2026
112 of 114 checks passed
@MichalStrehovsky
MichalStrehovsky deleted the fix129697 branch June 23, 2026 11:39
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone Jun 24, 2026
eiriktsarpalis pushed a commit that referenced this pull request Jul 15, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

3 participants