-
Notifications
You must be signed in to change notification settings - Fork 1.2k
PrimitiveObjectFormatter eagerly reads integer where double could be preferred. #4649
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A bug in `PrimitiveObjectFormatter` which is used when deserializing `object` was eagerly reading doubles as integers. This was flagged in failing yaml test reproduce: build rest-spec -- xpack -f analytics -t t_test.yml -s "heteroscedastic t-test" Scrollbars now also collapse when running the yaml tests now that ShellProgressbar properly scrolls children into view this got to be a tad excessive
1 failing test not related:
|
github-actions bot
pushed a commit
that referenced
this pull request
Apr 21, 2020
A bug in `PrimitiveObjectFormatter` which is used when deserializing `object` was eagerly reading doubles as integers. This was flagged in failing yaml test reproduce: build rest-spec -- xpack -f analytics -t t_test.yml -s "heteroscedastic t-test" Scrollbars now also collapse when running the yaml tests now that ShellProgressbar properly scrolls children into view this got to be a tad excessive
github-actions bot
pushed a commit
that referenced
this pull request
Apr 21, 2020
A bug in `PrimitiveObjectFormatter` which is used when deserializing `object` was eagerly reading doubles as integers. This was flagged in failing yaml test reproduce: build rest-spec -- xpack -f analytics -t t_test.yml -s "heteroscedastic t-test" Scrollbars now also collapse when running the yaml tests now that ShellProgressbar properly scrolls children into view this got to be a tad excessive
russcam
added a commit
that referenced
this pull request
Apr 22, 2020
Relates: #4649 This commit fixes a bug in the IsLong implementation, and prefers reading long values over double values in PrimitiveObjectFormatter when the bytes represent a valid long value, to avoid floating point rounding errors that may happen when parsing a double from a long value. The bug in IsLong was that the loop over the array segment bytes was exiting early when the count of bytes was the same as long.Min/MaxValue length, and the current loop byte is less than the byte at index in long.Min/MaxValue. In this scenario, it should not exit early, but not continue to check following loop bytes against byte at index in long.Min/MaxValue. Following loop iterations still need to check whether remaining bytes are numbers.
Mpdreamz
pushed a commit
that referenced
this pull request
Apr 22, 2020
Relates: #4649 This commit fixes a bug in the IsLong implementation, and prefers reading long values over double values in PrimitiveObjectFormatter when the bytes represent a valid long value, to avoid floating point rounding errors that may happen when parsing a double from a long value. The bug in IsLong was that the loop over the array segment bytes was exiting early when the count of bytes was the same as long.Min/MaxValue length, and the current loop byte is less than the byte at index in long.Min/MaxValue. In this scenario, it should not exit early, but not continue to check following loop bytes against byte at index in long.Min/MaxValue. Following loop iterations still need to check whether remaining bytes are numbers.
github-actions bot
pushed a commit
that referenced
this pull request
Apr 22, 2020
Relates: #4649 This commit fixes a bug in the IsLong implementation, and prefers reading long values over double values in PrimitiveObjectFormatter when the bytes represent a valid long value, to avoid floating point rounding errors that may happen when parsing a double from a long value. The bug in IsLong was that the loop over the array segment bytes was exiting early when the count of bytes was the same as long.Min/MaxValue length, and the current loop byte is less than the byte at index in long.Min/MaxValue. In this scenario, it should not exit early, but not continue to check following loop bytes against byte at index in long.Min/MaxValue. Following loop iterations still need to check whether remaining bytes are numbers.
github-actions bot
pushed a commit
that referenced
this pull request
Apr 22, 2020
Relates: #4649 This commit fixes a bug in the IsLong implementation, and prefers reading long values over double values in PrimitiveObjectFormatter when the bytes represent a valid long value, to avoid floating point rounding errors that may happen when parsing a double from a long value. The bug in IsLong was that the loop over the array segment bytes was exiting early when the count of bytes was the same as long.Min/MaxValue length, and the current loop byte is less than the byte at index in long.Min/MaxValue. In this scenario, it should not exit early, but not continue to check following loop bytes against byte at index in long.Min/MaxValue. Following loop iterations still need to check whether remaining bytes are numbers.
Mpdreamz
pushed a commit
that referenced
this pull request
Apr 22, 2020
Relates: #4649 This commit fixes a bug in the IsLong implementation, and prefers reading long values over double values in PrimitiveObjectFormatter when the bytes represent a valid long value, to avoid floating point rounding errors that may happen when parsing a double from a long value. The bug in IsLong was that the loop over the array segment bytes was exiting early when the count of bytes was the same as long.Min/MaxValue length, and the current loop byte is less than the byte at index in long.Min/MaxValue. In this scenario, it should not exit early, but not continue to check following loop bytes against byte at index in long.Min/MaxValue. Following loop iterations still need to check whether remaining bytes are numbers. Co-authored-by: Russ Cam <russ.cam@elastic.co>
Mpdreamz
pushed a commit
that referenced
this pull request
Apr 22, 2020
Relates: #4649 This commit fixes a bug in the IsLong implementation, and prefers reading long values over double values in PrimitiveObjectFormatter when the bytes represent a valid long value, to avoid floating point rounding errors that may happen when parsing a double from a long value. The bug in IsLong was that the loop over the array segment bytes was exiting early when the count of bytes was the same as long.Min/MaxValue length, and the current loop byte is less than the byte at index in long.Min/MaxValue. In this scenario, it should not exit early, but not continue to check following loop bytes against byte at index in long.Min/MaxValue. Following loop iterations still need to check whether remaining bytes are numbers. Co-authored-by: Russ Cam <russ.cam@elastic.co>
russcam
added a commit
that referenced
this pull request
May 7, 2020
Relates: #4649 This commit fixes a bug in the IsLong implementation, and prefers reading long values over double values in PrimitiveObjectFormatter when the bytes represent a valid long value, to avoid floating point rounding errors that may happen when parsing a double from a long value. The bug in IsLong was that the loop over the array segment bytes was exiting early when the count of bytes was the same as long.Min/MaxValue length, and the current loop byte is less than the byte at index in long.Min/MaxValue. In this scenario, it should not exit early, but not continue to check following loop bytes against byte at index in long.Min/MaxValue. Following loop iterations still need to check whether remaining bytes are numbers. (cherry picked from commit f8c6940)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A bug in
PrimitiveObjectFormatter
which is used when deserializingobject
was eagerly reading doubles as integers. This was flagged infailing yaml test reproduce:
Scrollbars now also collapse when running the yaml tests now that
ShellProgressbar properly scrolls children into view this got to be a
tad excessive