Keep unsigned jsonb integers above i64::MAX - #5197
Draft
LucaCappelletti94 wants to merge 1 commit into
Draft
Conversation
Member
|
Just to note this down here: This likely affects |
LucaCappelletti94
force-pushed
the
fuzz-sqlite-jsonb-unsigned-writer
branch
3 times, most recently
from
September 5, 2026 06:46
d0dba79 to
22e8ba1
Compare
LucaCappelletti94
force-pushed
the
fuzz-sqlite-jsonb-unsigned-writer
branch
from
September 5, 2026 07:21
22e8ba1 to
e598639
Compare
weiznich
requested review from
a team
and
a lite review from Copilot
and removed request for
Copilot
September 5, 2026 09:44
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.
write_jsonb_numberno longer rounds au64pasti64::MAX, since #5195 replaced that code, but its new classifier treats any character that is not an ASCII digit as float syntax, and a minus sign is one, sojson!(-1)is now written as aFLOATthatjson_validrejects and diesel cannot read back. This recognizes integer text instead, an optional minus followed by digits.With the unsigned value now an exact
INT,read_jsonb_intturned out to reject it, having kept a payload only when it parsed as ani64, sojsonb('18446744073709551615')did not read back either. It now accepts any integer payload that survives without rounding.This came out of a fuzzer I am writing for diesel's deserialization code, and this PR only adds the red test for now.