Skip to content

[3.15] gh-160535: Keep the ZstdDict alive until the zstd context is freed (GH-160536) - #160635

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

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

Conversation

@miss-islington

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

Copy link
Copy Markdown
Contributor

The garbage collector could release a ZstdCompressor's dictionary, or
the digested dictionaries cached by the ZstdDict, while worker threads
of the compression context were still reading them. They are now only
released on deallocation, after the context has been freed.

ANT-2026-CT3P1CSJ

  • Visit the type in the compressor and decompressor traverse; move NEWS to Library
    (cherry picked from commit b949033)

Co-authored-by: Gregory P. Smith [email protected]

…eed (pythonGH-160536)

The garbage collector could release a ZstdCompressor's dictionary, or
the digested dictionaries cached by the ZstdDict, while worker threads
of the compression context were still reading them.  They are now only
released on deallocation, after the context has been freed.

ANT-2026-CT3P1CSJ

+ Visit the type in the compressor and decompressor traverse; move NEWS to Library
(cherry picked from commit b949033ae8b22ff77e798a08f4ecc6eaf4cf0d8a)

Co-authored-by: Gregory P. Smith <[email protected]>
@gpshead
gpshead merged commit fa1a212 into python:3.15 Oct 25, 2026
54 checks passed
@miss-islington
miss-islington deleted the backport-b949033-3.15 branch October 25, 2026 06:13
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