-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/8.0] Fix analysis of interface methods on generic types #93748
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:
|
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved. we will take for consideration in 8.0.x
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
main
branch ofdotnet/runtime
when 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/runtime
integration 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.