10000 gh-106905: Use separate structs to track recursion depth in each PyAST_mod2obj call. by yilei · Pull Request #113035 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-106905: Use separate structs to track recursion depth in each PyAST_mod2obj call. #113035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 25, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
NEWS entry.
  • Loading branch information
gpshead committed Dec 13, 2023
commit 5bb710b92e0a048aa47c2181547082a1afd6dbd3
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.
0