FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.15] gh-159739: Hold the codec registry lock while unregistering (GH-160168) by miss-islington · Pull Request #160292 · python/cpython · GitHub

Repository navigation

[3.15] gh-159739: Hold the codec registry lock while unregistering (GH-160168) - #160292

Merged
JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-784b305-3.15
Oct 22, 2026
Merged

JelleZijlstra merged 1 commit into
python:3.15from
miss-islington:backport-784b305-3.15

Conversation

miss-islington commented Oct 22, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

Concurrent calls to codecs.unregister() can shrink the search path between its length check and indexed lookup in a free-threaded build. The lookup then returns NULL and an unconditional decref crashes the interpreter; hold the registry mutex across the scan and removal. Also reported in gh-157078. Backport to 3.15 and 3.14.
(cherry picked from commit 784b305)

Co-authored-by: Jelle Zijlstra jelle@openai.com

…thonGH-160168)

Concurrent calls to codecs.unregister() can shrink the search path between its length check and indexed lookup in a free-threaded build. The lookup then returns NULL and an unconditional decref crashes the interpreter; hold the registry mutex across the scan and removal. Also reported in pythongh-157078. Backport to 3.15 and 3.14.
(cherry picked from commit 784b305)

Co-authored-by: Jelle Zijlstra <jelle@openai.com>
JelleZijlstra enabled auto-merge (squash) October 22, 2026 22:21
JelleZijlstra merged commit 47667b8 into python:3.15 Oct 22, 2026
56 checks passed
miss-islington deleted the backport-784b305-3.15 branch October 22, 2026 22:26
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL