Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@davidwrighton
Copy link
Member

@davidwrighton davidwrighton commented Dec 9, 2025

It turns out that RyuJit throws OverflowException here, not ArithmeticException. This isn't against the ECMA spec since OverflowException derives from ArithmeticException, so lets just follow Ryujit's lead.

It turns out that RyuJit throws OverflowException here, not ArithmeticException. This is contrary to the ECMA spec, but lets not introduce an unnecessary difference here.
Copilot AI review requested due to automatic review settings December 9, 2025 23:08
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Dec 9, 2025
Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an inconsistency in exception handling for the ckfinite IL operation in the CoreCLR interpreter. The ckfinite instruction throws OverflowException when encountering infinite or NaN values in RyuJIT, but the interpreter was incorrectly throwing ArithmeticException. This change aligns the interpreter behavior with RyuJIT.

  • Changed exception type from ArithmeticException to OverflowException for floating-point finite checks
  • Applied consistently to both float and double overloads of CkfiniteHelper

@davidwrighton davidwrighton added area-CodeGen-Interpreter-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Dec 9, 2025
@dotnet-policy-service
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants