Repository navigation
Disable LZMA encoder timeouts to prevent input loss - #197
Merged
tobiass-threedy merged 1 commit intoNov 13, 2026
Merged
Conversation
The multithreaded encoder may return LZMA_OK on timeout with input still pending and output space available. This violates the SymmetricFilter contract and lets the read path overwrite unconsumed input. Disable the encoder timeout so each call consumes its input or fills its output buffer. Give the timeout a named constant to document why it is zero. Fixes boostorg#196.
tobiass-threedy
force-pushed
the
fix-lzma-timeout-input-loss
branch
from
November 13, 2026 10:52
371076f to
62ec0f0
Compare
Collaborator
|
Thank you for the report! |
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.
Fixes #196.
The multithreaded LZMA encoder can return
LZMA_OKon its timeout while input remains and output space is available. Returning immediately violates the SymmetricFilter contract and letssymmetric_filter::read()overwrite pending input, producing a valid XZ stream with missing data.Disable the encoder timeout using a named constant, with a comment explaining the required input/output postcondition. Calls can now wait until input is consumed, output fills, or the encoder finishes. The public interface is unchanged.
Validation:
BOOST_IOSTREAMS_LZMA_NO_MULTITHREADED=1: all 6 cases pass.The full modular Boost build was not run.