]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-32758: Warn that compile() can crash when compiling to an AST object (GH-6043...
authorAshley Whetter <AWhetter@users.noreply.github.com>
Fri, 18 Oct 2019 08:00:03 +0000 (01:00 -0700)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 18 Oct 2019 08:00:03 +0000 (11:00 +0300)
(cherry picked from commit f7a6ff6fcab32a53f262ba3f8a072c27afc330d7)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
Doc/library/functions.rst

index 8701f9d8ffb0ef91fe4aee5d7558be590ea60b13..23f34a3de0f05cdd3f79899cff1ea9009a5852ba 100644 (file)
@@ -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.