-
Notifications
You must be signed in to change notification settings - Fork 868
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
Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) #6402
Conversation
Thank you @dariocurr 🙏 Also @crepererum 's analysis #6401 (review) is that this will not be a breaking API and thus we'll be able to release this in the next minor release #6340 |
This PR looks good to me -- I am just going to run the cast kernel benchmarks to make sure there are no hidden performance implications |
Thank you for this project, I'm glad to help! |
Sorry, I was making other little improvements and mistakenly pushed on master 😢 |
I ran with this branch and saw no performance difference (as expected)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @dariocurr
This compares master with master ? |
Sorry that is my script's fault -- both branches are named So it is comparing |
I'll plan to merge this tomorrow unless there are other comments cc @Jefffrey |
Ah okay, makes sense. |
@@ -423,7 +423,7 @@ macro_rules! primitive_display { | |||
let mut buffer = [0u8; <$t as ArrowPrimitiveType>::Native::FORMATTED_SIZE]; | |||
// SAFETY: | |||
// buffer is T::FORMATTED_SIZE | |||
let b = unsafe { lexical_core::write_unchecked(value, &mut buffer) }; | |||
let b = lexical_core::write(value, &mut buffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safety comment above this can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with 481883d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks.
Ran example test from #5422 under this PR branch, now panics instead of parsing incorrectly:
arrow-rs$ cargo test -p arrow-json reader::tests::test_basic -- --nocapture --exact
Blocking waiting for file lock on build directory
Compiling arrow-json v53.0.0 (/home/jeffrey/Code/arrow-rs/arrow-json)
Finished `test` profile [unoptimized + debuginfo] target(s) in 9.76s
Running unittests src/lib.rs (/media/jeffrey/1tb_860evo_ssd/.cargo_target_cache/debug/deps/arrow_json-8aa17cf2e84b5131)
running 1 test
thread 'reader::tests::test_basic' panicked at arrow-json/src/reader/mod.rs:742:18:
called `Result::unwrap()` on an `Err` value: JsonError("whilst decoding field 'a': failed to parse 999 as UInt8")
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test reader::tests::test_basic ... FAILED
failures:
failures:
reader::tests::test_basic
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 78 filtered out; finished in 0.00s
error: test failed, to rerun pass `-p arrow-json --lib`
…023-0086) (apache#6402) * Update lexical-core requirement from 0.8 to 1.0 * Remove safety comment
Which issue does this PR close?
Closes #6397
Rationale for this change
It solves RUSTSEC-2023-0086
What changes are included in this PR?
Just update the
Cargo.toml
s and remove unnecessaryunsafe
block according to:https://github.com/Alexhuszagh/rust-lexical/blob/fd3baac52d87b3253bd46669a498140bf2886833/CHANGELOG#L48
Are there any user-facing changes?
No