summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshley Whetter <AWhetter@users.noreply.github.com>2019-10-18 08:00:03 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2019-10-18 08:00:03 (GMT)
commit8eb27cc35489848596d9fb4b1c91fac00ae75d21 (patch)
tree1a749126e2fd7fc9f31c85a3ce4572238547e54f
parentbef8d9acda7a4b9203e55371bb7a7da1c4a7fcbe (diff)
downloadcpython-8eb27cc35489848596d9fb4b1c91fac00ae75d21.zip
cpython-8eb27cc35489848596d9fb4b1c91fac00ae75d21.tar.gz
cpython-8eb27cc35489848596d9fb4b1c91fac00ae75d21.tar.bz2
bpo-32758: Warn that compile() can crash when compiling to an AST object (GH-6043) (GH-16566)
(cherry picked from commit f7a6ff6fcab32a53f262ba3f8a072c27afc330d7) Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
-rw-r--r--Doc/library/functions.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 8701f9d..23f34a3 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -248,6 +248,12 @@ section.
character. This is to facilitate detection of incomplete and complete
statements in the :mod:`code` module.
+ .. warning::
+
+ It is possible to crash the Python interpreter with a
+ sufficiently large/complex string when compiling to an AST
+ object due to stack depth limitations in Python's AST compiler.
+
.. versionchanged:: 2.3
The *flags* and *dont_inherit* arguments were added.