Repository navigation
Backport upstream LDM size-estimation fix - #359
Open
yousefissa wants to merge 1 commit into
Open
yousefissa wants to merge 1 commit into
yousefissa wants to merge 1 commit into
Conversation
Resolve default LDM parameters before context and stream size estimation, using a local copy to preserve caller parameters. Add regression coverage for defaults, partial overrides, and strategy-dependent defaults. Backport facebook/zstd commit 81cf153bce7c0ab41aeef574a70e32eaea7a8ba7 (PR #4591). Fixes indygreg#345. Co-authored-by: Cody <166262726+kowirth@users.noreply.github.com>
yousefissa
marked this pull request as ready for review
October 14, 2026 22:01
Author
|
@indygreg Could you review this backport of facebook/zstd#4591 and approve CI? It fixes the LDM size-estimation crash; the C and CFFI suites both pass locally. |
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 #345.
Backport facebook/zstd#4591, authored by @fresh3nough (upstream commit 81cf153). Both context and stream size estimators resolve default LDM parameters on a local copy before estimation, avoiding division by zero without changing the caller's parameters. The vendor code changes match upstream exactly.
Regression coverage compares default and explicit LDM settings, includes a partial override and a different strategy, and checks parameter immutability and repeatability.
Verified on CPython 3.14.6, macOS ARM64:
git diff --checkpass.Prepared with Codex assistance.