summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
diff options
context:
space:
mode:
authorBatuhan Taskaya <batuhan@python.org>2021-06-03 20:01:02 (GMT)
committerGitHub <noreply@github.com>2021-06-03 20:01:02 (GMT)
commitf3491242e41933aa9529add7102edb68b80a25e9 (patch)
treecc4331ec55371585163e5db0291d6c17a765eca7 /Misc/NEWS.d
parentf461a7fc3f8740b9e79e8874175115a3474e5930 (diff)
downloadcpython-f3491242e41933aa9529add7102edb68b80a25e9.zip
cpython-f3491242e41933aa9529add7102edb68b80a25e9.tar.gz
cpython-f3491242e41933aa9529add7102edb68b80a25e9.tar.bz2
bpo-11105: Do not crash when compiling recursive ASTs (GH-20594)
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.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2020-06-02-13-21-14.bpo-11105.wceryW.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2020-06-02-13-21-14.bpo-11105.wceryW.rst b/Misc/NEWS.d/next/Core and Builtins/2020-06-02-13-21-14.bpo-11105.wceryW.rst
new file mode 100644
index 0000000..8891936
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2020-06-02-13-21-14.bpo-11105.wceryW.rst
@@ -0,0 +1,3 @@
+When compiling :class:`ast.AST` objects with recursive references
+through :func:`compile`, the interpreter doesn't crash anymore instead
+it raises a :exc:`RecursionError`.