mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.9] bpo-11105: Do not crash when compiling recursive ASTs (GH-20594) (GH-26522)
When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError..
(cherry picked from commit f3491242e4
)
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
This commit is contained in:
parent
5a8ddcc452
commit
de58b319af
4 changed files with 732 additions and 4 deletions
700
Python/Python-ast.c
generated
700
Python/Python-ast.c
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue