Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Feb 8, 2024

Backport of #98125 to release/8.0-staging

/cc @tannergooding

Customer Impact

  • Customer reported
  • Found internally

Developers calling MaxNumber or MinNumber with one constant input may see NaN propagated instead of the number. This results in incorrect results as these APIs are explicitly meant to not propagate the NaN.

Regression

  • Yes
  • No

This was introduced in .NET 8 as part of AVX-512 related acceleration work. The actual underlying issue was simple: we were swapping the operands as intended, but then re-swapped them back when actually modifying the node.

Testing

Tests were added covering the scenario in a way that explicitly ensures the JIT can only see one of the inputs as constant. If the JIT happened to see both inputs as constant, such as due to other optimizations, the value would have been correct.

Risk

Low. The issue was a simple one that was missed in code review and testing due to involving partial constant folding. It impacts a small set of math APIs, which themselves are relatively new to .NET (new in .NET 7)

@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Feb 8, 2024
@ghost
Copy link

ghost commented Feb 8, 2024

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

Issue Details

Backport of #98125 to release/8.0-staging

/cc @tannergooding

Customer Impact

  • Customer reported
  • Found internally

[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.]

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

[How was the fix verified? How was the issue missed previously? What tests were added?]

Risk

[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.]

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@tannergooding
Copy link
Member

CC. @EgorBo for sign-off on this backport (since you signed off on the fix.

This was an accidental regression in .NET 8, is customer reported, and the fix is simple/low risk. So it meets the requirements for backport.

@tannergooding tannergooding added the Servicing-consider Issue for next servicing release review label Feb 8, 2024
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a 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 8.0.x

@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Feb 8, 2024
@rbhanda rbhanda added this to the 8.0.3 milestone Feb 8, 2024
@tannergooding
Copy link
Member

CC. @EgorBo, @dotnet/jit-contrib for merging. Monday February 12th is the Code Complete deadline for the March Release, so it needs to be merged by then (Julie asked that I let one of the JIT reviewers do the actual merge here).

@EgorBo EgorBo merged commit d45a576 into release/8.0-staging Feb 10, 2024
@jkotas jkotas deleted the backport/pr-98125-to-release/8.0-staging branch February 21, 2024 00:49
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants