forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.11] [3.12] pythongh-106905: Use separate structs to track recursio…
…n depth in each PyAST_mod2obj call. (pythonGH-113035) (pythonGH-113472) (cherry picked from commit 48c4973) (cherry picked from commit d58a5f4) Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Yilei Yang <[email protected]> Co-authored-by: Gregory P. Smith [Google LLC] <[email protected]>
- Loading branch information
1 parent
1cc594d
commit 7be0d24
Showing
4 changed files
with
397 additions
and
310 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
Misc/NEWS.d/next/Core and Builtins/2023-12-13-11-45-53.gh-issue-106905.5dslTN.rst
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains 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
Oops, something went wrong.