Skip to content

[3.15] gh-160549: Fix crash when freeing a busy multi-threaded ZstdCompressor (GH-160550) - #160637

Merged
gpshead merged 2 commits into
python:3.15from
miss-islington:backport-23a5ba1-3.15
Oct 25, 2026
Merged

gpshead merged 2 commits into
python:3.15from
miss-islington:backport-23a5ba1-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

ZSTD_freeCCtx() frees a dictionary loaded with ZSTD_CCtx_loadDictionary()
before it stops the worker threads. Make libzstd wait for unfinished
jobs before freeing the compression context of a ZstdCompressor that
uses worker threads and a ZstdDict.

Works around facebook/zstd#4862
(cherry picked from commit 23a5ba1)

Co-authored-by: Gregory P. Smith 68491+gpshead@users.noreply.github.com

…pressor (pythonGH-160550)

ZSTD_freeCCtx() frees a dictionary loaded with ZSTD_CCtx_loadDictionary()
before it stops the worker threads.  Make libzstd wait for unfinished
jobs before freeing the compression context of a ZstdCompressor that
uses worker threads and a ZstdDict.

Works around facebook/zstd#4862
(cherry picked from commit 23a5ba1c932e63ec811d6d9095ac80f580dfe102)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
@gpshead
gpshead merged commit 0a8940c into python:3.15 Oct 25, 2026
54 checks passed
@miss-islington
miss-islington deleted the backport-23a5ba1-3.15 branch October 25, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants