dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.93k stars 4.64k forks source link

Incorrect devirtualization in corner cases #94399

Open MichalStrehovsky opened 10 months ago

MichalStrehovsky commented 10 months ago

The fix from #93540 needs to be extended to DevitualizationManager::ResolveVirtualMethod.

This has additional problems because we apparently want to be able to devirtualize on canonical versions of code. I wonder if we have a similar bug in ResolveConstraintMethodApprox.

Look for this issue number to find a test that needs to work around. This affects both Native AOT and crossgen2.

ghost commented 10 months ago

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas See info in area-owners.md if you want to be subscribed.

Issue Details
The fix from #93540 needs to be extended to `DevitualizationManager::ResolveVirtualMethod`. This has additional problems because we apparently want to be able to devirtualize on canonical versions of code. I wonder if we have a similar bug in ResolveConstraintMethodApprox. Look for this issue number to find a test that needs to work around. This affects both Native AOT and crossgen2.
Author: MichalStrehovsky
Assignees: -
Labels: `area-NativeAOT-coreclr`
Milestone: -