FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[release/9.0] Fix devirtualization across genericness in the hierarchy by MichalStrehovsky · Pull Request #108470 · dotnet/runtime · GitHub

Repository navigation

[release/9.0] Fix devirtualization across genericness in the hierarchy - #108470

Merged
jeffschwMSFT merged 2 commits into
dotnet:release/9.0from
MichalStrehovsky:backport108442
Oct 3, 2024
Merged

jeffschwMSFT merged 2 commits into
dotnet:release/9.0from
MichalStrehovsky:backport108442

Conversation

MichalStrehovsky commented Oct 2, 2024 •
edited
Loading

Copy link
Copy Markdown
Member

Backport of #108442 to release/9.0

Customer Impact

  • Customer reported
  • Found internally

A new optimization added in 9.0 was causing incorrect devirtualization to a method on a base class instead of the correct more derived class.

Regression

  • Yes
  • No

Introduced in #97812 when the optimization was added.

Testing

This was found when I was making devirtualization kick in even more often in a .NET 10 PR. It is however hittable in .NET 9 too.

Risk

Should be low. The change was straightforward and none of our test passes found problems with it.

This code was trying to answer question: "Was this method overriden by something else in a more derived class"? It was walking the base hierarchy in canonical form, but that was leading to methods not resolving at all. The fix is to walk the non-canonical hierarchy and canonicalize after we resolved everything.

I ran into this in dotnet#108379 that unlocked more whole program devirtualization and `StringSearchValuesBase` is in this shape.

Copy link
Copy Markdown
Contributor

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

jeffschwMSFT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

lgtm. please get a code review. we will take for consideration in 9 GA

jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Oct 2, 2024
jeffschwMSFT added this to the 9.0.0 milestone Oct 2, 2024
agocke added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 3, 2024
jeffschwMSFT merged commit 2924cc8 into dotnet:release/9.0 Oct 3, 2024
github-actions Bot locked and limited conversation to collaborators Nov 3, 2024
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.

Labels

area-NativeAOT-coreclr Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL