Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Mar 12, 2025

Backport of #113396 to release/9.0-staging

/cc @AndyAyersMS

Customer Impact

  • Customer reported
  • Found internally

Unexpected floating-point divide by zero exception. While we generally don't support running managed code with FP exceptions enabled, we also should not be generating such exceptions needlessly.

There is precedent for us back porting this kind of change, see eg: #76334

Regression

  • Yes
  • No

.NET 9 added a fair amount of FP processing to the JIT that wasn't there in .NET 8.

Testing

Verified the JIT will no longer cause FP exception from this computation.

Risk

Low, no diffs in SPMI.

This can trip up users that have enabled floating point exceptions.

While we don't generally support changing the exception modes we also
can easily avoid dividing by zero here.

Addresses #113369
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 12, 2025
Copy link
Contributor

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

@AndyAyersMS
Copy link
Member

@jeffschwMSFT @JulieLeeMSFT FYI

cc @dotnet/jit-contrib

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.

lgtm. we will take for consideration in 9.0.x

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Mar 12, 2025
@jeffschwMSFT jeffschwMSFT added this to the 9.0.x milestone Mar 12, 2025
@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Mar 18, 2025
@leecow leecow modified the milestones: 9.0.x, 9.0.5 Mar 18, 2025
@jeffschwMSFT jeffschwMSFT merged commit c8613e5 into release/9.0-staging Mar 26, 2025
97 of 99 checks passed
@jkotas jkotas deleted the backport/pr-113396-to-release/9.0-staging branch April 12, 2025 13:58
@github-actions github-actions bot locked and limited conversation to collaborators May 13, 2025
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