Skip to content
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

OS#16115338 Update _.floor to normalize -0 to 0 [OSS-Fuzz] #4754

Merged
merged 2 commits into from
Mar 1, 2018

Conversation

jackhorton
Copy link
Contributor

The intl spec refers to the floor function in DefaultNumberOption, which we had previously implemented as exactly Math.floor Math.floor is defined to return -0 when given -0 as input. However, DefaultNumberOption actually refers to the floor mathematical operation, which states that -0 should be normalized to 0, which is the more intuitive behavior.

This fixes a FailFast that triggered when we couldn't retrieve the minimumFractionDigits as a TaggedInt.

Copy link
Contributor

@sethbrenith sethbrenith left a comment

Choose a reason for hiding this comment

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

:shipit:

@chakrabot chakrabot merged commit 02df7fe into chakra-core:master Mar 1, 2018
chakrabot pushed a commit that referenced this pull request Mar 1, 2018
…to 0 [OSS-Fuzz]

Merge pull request #4754 from jackhorton:os16115338

The intl spec refers to the `floor` function in [DefaultNumberOption](https://tc39.github.io/ecma402/#sec-defaultnumberoption), which we had previously implemented as exactly Math.floor Math.floor is defined to return -0 when given -0 as input. However, DefaultNumberOption actually refers to [the floor mathematical operation](https://tc39.github.io/ecma262/#sec-mathematical-operations), which states that -0 should be normalized to 0, which is the more intuitive behavior.

This fixes a FailFast that triggered when we couldn't retrieve the minimumFractionDigits as a TaggedInt.
@jackhorton jackhorton deleted the os16115338 branch March 1, 2018 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants