[56_maintenance] Prevent BitChunks length overflow (#9818)#9896
Merged
alamb merged 1 commit intoapache:56_maintenancefrom May 6, 2026
Merged
[56_maintenance] Prevent BitChunks length overflow (#9818)#9896alamb merged 1 commit intoapache:56_maintenancefrom
alamb merged 1 commit intoapache:56_maintenancefrom
Conversation
This was referenced May 5, 2026
Contributor
Author
|
Fix for the msrv check: #9902 |
alamb
added a commit
that referenced
this pull request
May 5, 2026
…#9902) NOTE: almost all of this PR is `Cargo.lock` files. I swear it is easy to review... - Part of #9857 - Follow-up to #9896 # Rationale The MSRV check is failing on 56 (I saw on #989) due to the fact that many of arrow's dependencies have upgraded to a newer version of rust that has a newer MSRV. Here is an example CI fail https://github.com/apache/arrow-rs/actions/runs/25373570591/job/74402867748?pr=9896 ``` Run if which cargo-msrv ; then echo "using existing cargo-msrv binary" ; else cargo install cargo-msrv ; fi if which cargo-msrv ; then echo "using existing cargo-msrv binary" ; else cargo install cargo-msrv ; fi shell: sh -e {0} env: RUSTFLAGS: -C debuginfo=1 RUST_BACKTRACE: 1 Updating crates.io index error: cannot install package `cargo-msrv 0.19.3`, it requires rustc 1.91.1 or newer, while the currently active rustc version is 1.89.0 `cargo-msrv 0.18.4` supports rustc 1.85 Error: Process completed with exit code 101. ``` This PR: - Pins `cargo-msrv` in the `56_maintenance` MSRV CI job to a version compatible with the Rust toolchain used by the job - Checks in a Cargo.lock file so the older versions of the crate still run Note this doesn't actually change any code in this crate. It simply updates the CI enough to get the tests to pass
- None. BitChunks used unchecked usize arithmetic when validating bit offset plus length. In optimized builds, very large lengths could wrap this bounds check before constructing the iterator state. This adds checked arithmetic for BitChunks bounds validation Yes. This adds regression coverage for overflowing bit offset plus length validation. Invalid BitChunks inputs whose offset and length cannot be represented without overflow now panic consistently. There are no API changes.
etseidl
approved these changes
May 5, 2026
Contributor
etseidl
left a comment
There was a problem hiding this comment.
checked against main and looks good
Contributor
Author
|
Thank you @etseidl |
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.
56.2.1(May 2026) #9857This PR:
56_maintenanceline