Skip to content
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

Fix typo in TryExpandTypeEquality #99101

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Fix typo in TryExpandTypeEquality #99101

merged 1 commit into from
Feb 29, 2024

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Feb 29, 2024

Fixes #99047

@ghost
Copy link

ghost commented Feb 29, 2024

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

Issue Details

Fixes #99047

Author: jkotas
Assignees: -
Labels:

area-NativeAOT-coreclr

Milestone: -

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Was about to PR this myself :)

@jkotas
Copy link
Member Author

jkotas commented Feb 29, 2024

This typo has been harmless most of the time since the next check in the sequence is going to immediately going to fail anyway. The offending method in Microsoft.AspNetCore.Identity.EntityFrameworkCore contains a specific sequence of bytes that passed the next check in the sequence and eventually fail with InvalidProgramException.

@MichalStrehovsky
Copy link
Member

This typo has been harmless most of the time since the next check in the sequence is going to immediately going to fail anyway. The offending method in Microsoft.AspNetCore.Identity.EntityFrameworkCore contains a specific sequence of bytes that passed the next check in the sequence and eventually fail with InvalidProgramException.

Yeah, I also didn't see a repro with .NET 9 so this needs to have quite some bad luck to get hit. I wasn't intending to write a regression test either.

@MichalStrehovsky
Copy link
Member

One thing I was thinking about is whether we'd want to put this substitution logic under a try/catch (TypeLoaderException) (and just use original IL if it throws). This would avoid compilation failure for a bug like this. Not sure if it's an overall improvement though.

@jkotas
Copy link
Member Author

jkotas commented Feb 29, 2024

This would avoid compilation failure for a bug like this. Not sure if it's an overall improvement though.

Yeah, the downside is that the bug like this would be hidden, and it would be unlikely for it to be reported.

@jkotas jkotas merged commit 18b0816 into dotnet:main Feb 29, 2024
110 checks passed
@jkotas jkotas deleted the typo branch February 29, 2024 17:26
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ilc compilation failure: Invalid IL or CLR metadata
2 participants