mirror of
https://github.com/python/cpython.git
synced 2026-10-28 18:35:21 +08:00
gh-160549: Fix crash when freeing a busy multi-threaded ZstdCompressor (GH-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 https://github.com/facebook/zstd/issues/4862
(cherry picked from commit 23a5ba1c93)
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>