[release/8.0-staging] Fix problem in ReadyToRun_TypeGenericInfoMap::HasConstraints#105728
Closed
ivdiazsa wants to merge 1 commit intodotnet:release/8.0-stagingfrom
ivdiazsa:pr-96358-backport
Closed
[release/8.0-staging] Fix problem in ReadyToRun_TypeGenericInfoMap::HasConstraints#105728ivdiazsa wants to merge 1 commit intodotnet:release/8.0-stagingfrom ivdiazsa:pr-96358-backport
ivdiazsa wants to merge 1 commit intodotnet:release/8.0-stagingfrom
ivdiazsa:pr-96358-backport
Conversation
lambdageek
approved these changes
Jul 30, 2024
jeffschwMSFT
approved these changes
Jul 31, 2024
Member
jeffschwMSFT
left a comment
There was a problem hiding this comment.
lgtm. we will take for consideration in 8.0.x
Member
|
@ivdiazsa Did you mean to close this? |
Contributor
Author
|
Oh no certainly not! This was a big mistake! |
Contributor
Author
|
@jeffschwMSFT I was housekeeping and forgot I had this pending. Would it be possible to open a new PR and get the approval right away? |
4 tasks
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.
Customer Impact
Backport of PR #96358 to release/8.0. This bug came to light as reported by a customer in issue #96225. Since it reproduces on .NET 8 but was gone by .NET 9 preview 1, some further bisecting was done to figure out the fix.
The problem was that the code in the VM that is supposed to check for whether a generic type had (a) constraining clause(s), actually checked for whether said type was either covariant or contravariant. This completely different and therefore erroneous behavior broke some scenarios with generics and made them crash, like the one hindering our customer in this case.
Regression
This is a regression as the same scenario works properly in .NET 7 and .NET 6 versions. For context, it was accidentally introduced in this PR: #85743
Testing
This was validated using the customer's failing repro scenarios.
Risk
This PR poses little to no risk to the product. Since it's a small and simple one, we decided it would be a convenient and easy backport. The failure is well understood and has a well defined scope.