Repository navigation
MOD-6501, MOD-4551, MOD-4856, MOD-5714: fix crash from converting u64 to i64 - #1192
Merged
Merged
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.6 #1192 +/- ##
==========================================
- Coverage 78.06% 77.99% -0.08%
==========================================
Files 15 15
Lines 3912 3917 +5
==========================================
+ Hits 3054 3055 +1
- Misses 858 862 +4 ☔ View full report in Codecov by Sentry. |
iddm
approved these changes
Mar 7, 2024
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
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.
Description
Indexing
NUMERICfields has unchanged behavior.NUMERICfield with value greater thani64::min(-2^63), but less thani64::max(2^63 - 1) is indexed asi64. It does not lose precision. Its type isinteger.NUMERICfield with value greater thani64::max(2^63 - 1), but less thanu64::max(2^64 - 1) is indexed asu64. It does not lose precision. Its type isinteger.NUMERICfield with value greater thanu64::max(2^64 - 1), or lower thani64::min(-2^63), or containing a decimal point, is indexed asf64. Its type isnumber. This may implicate losing precision, but this is not a breaking change.NUMINCRBYbehavior changed to prevent crash.i64 + i64whose result is betweeni64::minandi64::maxhas unchanged behavior. Its result is stored asi64, its type isinteger.i64 + i64whose result is greater thani64::maxor less thani64::minexplicitly wraps instead of invoking undefined behavior. Its result is stored asi64, its type isinteger.i64 + u64andu64 + u64behavior is unchanged. Its result is stored asf64, its type isnumber. This may implicate losing precision, but this is not a breaking change.u64 + i64used to crash. Now it behaves consistently with the prior case.f64, the result is stored asf64, with typenumber.DROPofintegers stored asu64no longer crashes.This PR only affects
NUMERICfields using vanilla JSON, not those using HDT.Which issues this PR fixes
Main objects this PR modified