[3.11] gh-95185: Check recursion depth in the AST constructor (GH-95186) (GH-95208)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 0047447294)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-07-26 03:19:22 -07:00 committed by GitHub
parent 5a9920fcf5
commit 86eb500068
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 614 additions and 443 deletions

View file

@ -12,6 +12,8 @@ extern "C" {
struct ast_state {
int initialized;
int recursion_depth;
int recursion_limit;
PyObject *AST_type;
PyObject *Add_singleton;
PyObject *Add_type;