-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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
Conversation
…on depths in PyAST_mod2obj.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, so ast_state
is a global state? Ah, now I see the mistake.
Thanks @yilei for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry, @yilei and @serhiy-storchaka, I could not cleanly backport this to
|
Sorry, @yilei and @serhiy-storchaka, I could not cleanly backport this to
|
… in each PyAST_mod2obj call. (pythonGH-113035) (cherry picked from commit 48c4973) Co-authored-by: Yilei Yang <[email protected]> Co-authored-by: Gregory P. Smith [Google LLC] <[email protected]>
GH-113472 is a backport of this pull request to the 3.12 branch. |
…ch PyAST_mod2obj call. (GH-113035) (GH-113472) (cherry picked from commit 48c4973) Co-authored-by: Yilei Yang <[email protected]> Co-authored-by: Gregory P. Smith [Google LLC] <[email protected]>
…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]>
…ch PyAST_mod2obj call. (GH-113035) (GH-113472) (GH-113476) (cherry picked from commit 48c4973) (cherry picked from commit d58a5f4) Co-authored-by: Yilei Yang <[email protected]> Co-authored-by: Gregory P. Smith [Google LLC] <[email protected]>
…h PyAST_mod2obj call. (pythonGH-113035) Co-authored-by: Gregory P. Smith [Google LLC] <[email protected]>
…h PyAST_mod2obj call. (pythonGH-113035) Co-authored-by: Gregory P. Smith [Google LLC] <[email protected]>
…h PyAST_mod2obj call. (pythonGH-113035) Co-authored-by: Gregory P. Smith [Google LLC] <[email protected]>
…h PyAST_mod2obj call. (pythonGH-113035) Co-authored-by: Gregory P. Smith [Google LLC] <[email protected]>
This avoids a race condition in
PyAST_mod2obj
when the GIL could be released due to GC (on Python 3.11).This should fix #106905.