summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorBrett Simmers <swtaarrs@users.noreply.github.com>2024-05-02 22:25:36 (GMT)
committerGitHub <noreply@github.com>2024-05-02 22:25:36 (GMT)
commitf8290df63f1fd970dfd6bbfdc9a86341a9f97d05 (patch)
tree295dd866e9306b1d8ed7eda44872fd1d151b391d /Tools
parent4e2caf2aa046bf80e87e9b858837bb527459a034 (diff)
downloadcpython-f8290df63f1fd970dfd6bbfdc9a86341a9f97d05.zip
cpython-f8290df63f1fd970dfd6bbfdc9a86341a9f97d05.tar.gz
cpython-f8290df63f1fd970dfd6bbfdc9a86341a9f97d05.tar.bz2
gh-116738: Make `_codecs` module thread-safe (#117530)
The module itself is a thin wrapper around calls to functions in `Python/codecs.c`, so that's where the meaningful changes happened: - Move codecs-related state that lives on `PyInterpreterState` to a struct declared in `pycore_codecs.h`. - In free-threaded builds, add a mutex to `codecs_state` to synchronize operations on `search_path`. Because `search_path_mutex` is used as a normal mutex and not a critical section, we must be extremely careful with operations called while holding it. - The codec registry is explicitly initialized as part of `_PyUnicode_InitEncodings` to simplify thread-safety.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/c-analyzer/cpython/ignored.tsv2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/c-analyzer/cpython/ignored.tsv b/Tools/c-analyzer/cpython/ignored.tsv
index 87b695d..c4dbdcf 100644
--- a/Tools/c-analyzer/cpython/ignored.tsv
+++ b/Tools/c-analyzer/cpython/ignored.tsv
@@ -344,7 +344,7 @@ Python/ceval.c - _PyEval_BinaryOps -
Python/ceval.c - _Py_INTERPRETER_TRAMPOLINE_INSTRUCTIONS -
Python/codecs.c - Py_hexdigits -
Python/codecs.c - ucnhash_capi -
-Python/codecs.c _PyCodecRegistry_Init methods -
+Python/codecs.c _PyCodec_InitRegistry methods -
Python/compile.c - NO_LABEL -
Python/compile.c - NO_LOCATION -
Python/dynload_shlib.c - _PyImport_DynLoadFiletab -