-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 Item4
is missing in some ValueTuple
s' IStructuralEquatable.Equals
#91470
Conversation
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsBackport of #91461 to release/8.0 Customer ImpactSome runtime/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs Lines 1123 to 1128 in 91ac6b3
Search Reproduction Stepsusing System.Collections;
IStructuralEquatable a = ValueTuple.Create(1, 2, 3, 4, 5);
IStructuralEquatable b = ValueTuple.Create(1, 2, 3, 0, 5);
Console.WriteLine(a.Equals(b, EqualityComparer<object>.Default));
await Task.Delay(-1); Expected behaviorFalse Actual behaviorTrue TestingUnit test coverage gaps were filled and other RiskLow. This will correct a functional bug in a way that will alter application behavior, but it will correct the behavior.
|
8.0 only requires M2 approval until the day before the RC2 snap. @jeffhandley / @artl93 do you approve? |
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.
M2 Approved. I'm sure @jeffhandley would agree.
Merging this now. We will merge the 7.0 and 6.0 equivalent PRs in a later servicing release. |
Backport of #91461 to release/8.0
Customer Impact
Some
ValueTuple
s'IStructuralEquatable.Equals
methods skip comparingItem4
. This could lead to data loss or other functional issues in customer applications where this equality check drives application logic or persistence of data.runtime/src/libraries/System.Private.CoreLib/src/System/ValueTuple.cs
Lines 1123 to 1128 in 91ac6b3
Search
vt.Item3) &&
in that file to find more.Reproduction Steps
Expected behavior
False
Actual behavior
True
Testing
Unit test coverage gaps were filled and other
ValueTuple
items were checked to ensure they're being properly compared.Risk
Low. This will correct a functional bug in a way that will alter application behavior, but it will correct the behavior.