diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-04-25 10:38:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 10:38:00 (GMT) |
commit | face87c94e67ad9c72b9a3724f112fd76c1002b9 (patch) | |
tree | 13d540eb4c3be35aff2f66bf981e300930ac0b49 /Include/internal/pycore_compile.h | |
parent | b5adc8a7e5c13d175b4d3e53b37bc61de35b1457 (diff) | |
download | cpython-face87c94e67ad9c72b9a3724f112fd76c1002b9.zip cpython-face87c94e67ad9c72b9a3724f112fd76c1002b9.tar.gz cpython-face87c94e67ad9c72b9a3724f112fd76c1002b9.tar.bz2 |
bpo-42609: Check recursion depth in the AST validator and optimizer (GH-23744)
Diffstat (limited to 'Include/internal/pycore_compile.h')
-rw-r--r-- | Include/internal/pycore_compile.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_compile.h b/Include/internal/pycore_compile.h index e8859bb..06a6082 100644 --- a/Include/internal/pycore_compile.h +++ b/Include/internal/pycore_compile.h @@ -28,6 +28,9 @@ extern PyObject* _Py_Mangle(PyObject *p, PyObject *name); typedef struct { int optimize; int ff_features; + + int recursion_depth; /* current recursion depth */ + int recursion_limit; /* recursion limit */ } _PyASTOptimizeState; extern int _PyAST_Optimize( |