summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-12-25 20:40:33 (GMT)
committerGitHub <noreply@github.com>2023-12-25 20:40:33 (GMT)
commit4b358d754cf572cc3104fd92416a762a90055477 (patch)
tree5378ad5a52a7aa563af9a39380a9bdbdcc3e471e /Misc
parent1cc594d571d8baf37726debd7d4162c51dd77ecc (diff)
downloadcpython-4b358d754cf572cc3104fd92416a762a90055477.zip
cpython-4b358d754cf572cc3104fd92416a762a90055477.tar.gz
cpython-4b358d754cf572cc3104fd92416a762a90055477.tar.bz2
[3.11] gh-106905: Use separate structs to track recursion depth in each PyAST_mod2obj call. (GH-113035) (GH-113472) (GH-113476)
(cherry picked from commit 48c49739f5502fc7aa82f247ab2e4d7b55bdca62) (cherry picked from commit d58a5f453f59f44ccf09b1a9b11a0b879ac6f35b) Co-authored-by: Yilei Yang <yileiyang@google.com> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2023-12-13-11-45-53.gh-issue-106905.5dslTN.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-12-13-11-45-53.gh-issue-106905.5dslTN.rst b/Misc/NEWS.d/next/Core and Builtins/2023-12-13-11-45-53.gh-issue-106905.5dslTN.rst
new file mode 100644
index 0000000..e3a772f
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2023-12-13-11-45-53.gh-issue-106905.5dslTN.rst
@@ -0,0 +1,7 @@
+Use per AST-parser state rather than global state to track recursion depth
+within the AST parser to prevent potential race condition due to
+simultaneous parsing.
+
+The issue primarily showed up in 3.11 by multithreaded users of
+:func:`ast.parse`. In 3.12 a change to when garbage collection can be
+triggered prevented the race condition from occurring.