[release/8.0] Fix analysis of interface methods on generic types#93748
Merged
carlossanlop merged 3 commits intorelease/8.0from Oct 20, 2023
Merged
[release/8.0] Fix analysis of interface methods on generic types#93748carlossanlop merged 3 commits intorelease/8.0from
carlossanlop merged 3 commits intorelease/8.0from
Conversation
Fixes an issue observed in #92881. The dependency analysis within the compiler was incorrectly considering `Equals(object x, object y)` to be the implementation of `IEqualityComparer<T>.Equals(T, T)`. When we generate the interface dispatch table, we'd use the correct algorithm (that looks at uninstantiated types) and fail the compilation. The fix is to use the same algorithm during dependency analysis. Looks like this has been broken ever since interface support was added to CoreRT: dotnet/corert#626.
|
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsBackport of #93540 to release/8.0 Customer ImpactTestingRiskIMPORTANT: If this backport is for a servicing release, please verify that:
|
agocke
approved these changes
Oct 19, 2023
Contributor
|
When ready, please send an email to Tactics requesting approval. Friendly reminder that we need this merged before 4pm tomorrow Friday 20th to ensure it goes into GA. |
jeffschwMSFT
approved these changes
Oct 19, 2023
Member
jeffschwMSFT
left a comment
There was a problem hiding this comment.
approved. we will take for consideration in 8.0.x
This was referenced Oct 19, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #93540 to release/8.0
/cc @agocke @MichalStrehovsky
Customer Impact
This is not a regression.
This is an internal error in the AOT compiler when hitting a particular combination of interfaces on generic types. It was originally found in the
mainbranch ofdotnet/runtimewhen trying to upgrade various versions, but it has subsequently been revealed as being easy to hit in customer workloads as well. It's possible, but very complicated, to workaround this issue. It's also a complex internal error so it's difficult to determine that this bug is the source of the problem.Testing
Unit tests, fixing the
dotnet/runtimeintegration tests inmain.Risk
Low. Only affects Native AOT. We're reusing the same algorithm for interface analysis that we're using in another part of the compiler.