-
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/6.0] Ensure Max/Min for floating-point on x86/x64 are not handled as commutative #75772
Conversation
…tative (dotnet#75683) * Adding a regression test for SixLabors/ImageSharp#2117 * Ensure Max/Min for floating-point on x86/x64 are not handled as commutative * Applying formatting patch
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsBackport of #75683 to release/7.0-rc2 /cc @tannergooding Customer ImpactCustomers utilizing the This issue was raised by ImageSharp as it was impacting their ability to update code to target .NET 7. It also exists in .NET 6 and is trivial to hit with a simple refactoring of existing their existing logic. TestingExplicit tests were added to cover the impacted scenarios. RiskLow. This issue has been in the codebase for at least 5 years and impacts .NET Core 3.1, 5.0, 6.0, and 7.0. Due to other codegen improvements, it is now more likely to be hit in .NET 7. However, the root cause of the issue is related to an incorrect flag labeling the intrinsics as being
|
Cc @jeffschwMSFT. |
…sn't exist in .NET 6
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.
approved. we will take for consideration in 6.0.x
@tannergooding @jeffschwMSFT the milestone is incorrect, this is a 6.0 backport. Is this fix critical for the October release? If yes, then I can merge it, if not, then we will have to wait till next month. cc @mmitche |
Thanks for the correction. I think this aligns with 6.0.11 (right?) |
6.0.10 is October and 6.0.11 is November IIRC. @tannergooding what do you think? Is this critical for October or not? |
Talked to @tannergooding via Teams. This can wait for the next release. Also, this needs no OOB package authoring changes AFAIK, since it's modifying native code. |
Branch is open again. CI is green, approved, signed-off, no OOB package authoring required, ready to merge. |
Backport of #75683 to release/6.0
/cc @tannergooding
Customer Impact
Customers utilizing the
Sse.Min/Max(float)
,Sse2.Min/Max(double)
orAvx.Min/Max(float/double)
intrinsics may get "invalid" codegen that results in an incorrect result being returned if an input isNaN
or both inputs arezero
(of any sign).This issue was raised by ImageSharp as it was impacting their ability to update code to target .NET 7. It also exists in .NET 6 and is trivial to hit with a simple refactoring of existing their existing logic.
Testing
Explicit tests were added to cover the impacted scenarios.
Risk
Low. This issue has been in the codebase for at least 5 years and impacts .NET Core 3.1, 5.0, 6.0, and 7.0. Due to other codegen improvements, it is now more likely to be hit in .NET 7.
However, the root cause of the issue is related to an incorrect flag labeling the intrinsics as being
commutative
and we are effectively removing that flag so the code churn is small and any risk of the change is localized to these intrinsics.