Repository navigation
ChunkerParams: reject buzhash params that do not fit the chunker buffer (1.4-maint) - #10596
Merged
ThomasWaldmann merged 1 commit intoNov 5, 2026
Conversation
Chunker params like 10,12,11,4095 passed the CLI validation, but then crashed borg create with "AssertionError: too small max_size" when the chunker was constructed: the buzhash chunker needs window_size + 2^chunk_min + 1 <= 2^chunk_max. Check this at parse time and raise a proper ArgumentTypeError instead, like master does for buzhash64 (see 3a9ffd4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Chunker params like
10,12,11,4095passed the CLI validation, but then crashedborg createwith a traceback:The buzhash chunker needs
window_size + 2^chunk_min + 1 <= 2^chunk_max(see the assertion inChunker.__cinit__). This PR checks that at parse time and raises anArgumentTypeError, which is what master does for buzhash64 (3a9ffd4):(rc 2, no traceback). Before this change, such params could never be used, because the chunker gets constructed for every
create. So no setup that works today will be rejected now.Found during 1.4.6 release testing; 1.4.5 behaves the same.
Tests: added cases to
test_chunkerparams, including the exact boundary10,13,11,4095, which is still accepted. The full test suite passes locally on macOS.🤖 Generated with Claude Code