Skip to content

seekable_format: Make decompressor reinitialization safe - #4941

Open
terrelln wants to merge 1 commit into
meta:devfrom
terrelln:2026-11-12-seekable-init
Open

terrelln wants to merge 1 commit into
meta:devfrom
terrelln:2026-11-12-seekable-init

Conversation

@terrelln

Copy link
Copy Markdown
Contributor

Reinitialization overwrote the previous seek-table allocation. Read failures while loading a new table could also leak it, and failed reinitialization could leave old decoder state paired with the new source.

Release the previous table and reset decoder state before initialization, free partially loaded tables on I/O errors, and reject decompression until initialization succeeds. Document the reset contract and add regression tests for reuse, failure, and recovery across all input APIs.

@meta-cla meta-cla Bot added the CLA Signed label Nov 12, 2026
Reinitialization overwrote the previous seek-table allocation. Read failures while loading a new table could also leak it, and failed reinitialization could leave old decoder state paired with the new source.

Release the previous table and reset decoder state before initialization, free partially loaded tables on I/O errors, and reject decompression until initialization succeeds. Document the reset contract and add regression tests for reuse, failure, and recovery across all input APIs.
@terrelln
terrelln force-pushed the 2026-11-12-seekable-init branch from 93dab90 to 9a37c21 Compare November 12, 2026 20:41

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants