-
Notifications
You must be signed in to change notification settings - Fork 5k
valkey: fix null array, null CRLF, big number and blob error replies #39544
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
+279
−94
Merged
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2c273d8
valkey: fix null array, null crlf, bignumber, blob error replies
alii b45ccef
valkey: cover nested null array and torn junk null
alii 40d5256
valkey: describe RESPValue::Error as the reply it holds
robobun bbd98f8
valkey: decode resp3 big numbers as bigint
alii 246c8a5
valkey: test the resp decoder through the binary only
alii 502c84e
valkey: drop the dead empty check after the BigInt host call
robobun c2dd448
docs(redis): describe the three forms a big number reply can take
robobun 90b5905
types: document how redis raw replies convert
alii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| #![allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] | ||
| #![warn(unused_must_use)] | ||
| pub mod valkey_protocol; | ||
|
|
||
| #[cfg(test)] | ||
| mod native_test_shims; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| //! Native symbols normally provided by Bun's C++ side, shimmed for this crate's | ||
| //! `cargo test` binary. Never compiled into the real build. | ||
|
|
||
| /// `bun_core::fmt::parse_f64` calls WebKit's parser; the tests here never | ||
| /// parse a double, so a whole-buffer `str::parse` stands in for it. | ||
| #[unsafe(no_mangle)] | ||
| unsafe extern "C" fn WTF__parseDouble(bytes: *const u8, length: usize, counted: *mut usize) -> f64 { | ||
| // SAFETY: the caller passes a live `&[u8]` split into pointer and length. | ||
| let buf = unsafe { core::slice::from_raw_parts(bytes, length) }; | ||
| let parsed = core::str::from_utf8(buf) | ||
| .ok() | ||
| .and_then(|s| s.parse::<f64>().ok()); | ||
| // SAFETY: `counted` points at the caller's `usize` out-parameter. | ||
| unsafe { *counted = if parsed.is_some() { length } else { 0 } }; | ||
| parsed.unwrap_or(f64::NAN) | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.