Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Warn that compile() can crash when compiling to an AST object (GH-6043)…
… (GH-6046)

(cherry picked from commit f7a6ff6)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
  • Loading branch information
miss-islington and brettcannon committed Mar 9, 2018
1 parent b316c44 commit 19b42fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Doc/library/functions.rst
Expand Up @@ -260,6 +260,12 @@ are always available. They are listed here in alphabetical order.
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:: 3.2
Allowed use of Windows and Mac newlines. Also input in ``'exec'`` mode
does not have to end in a newline anymore. Added the *optimize* parameter.
Expand Down

0 comments on commit 19b42fe

Please sign in to comment.