diff options
author | Brett Cannon <brettcannon@users.noreply.github.com> | 2018-03-09 21:13:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-09 21:13:32 (GMT) |
commit | f7a6ff6fcab32a53f262ba3f8a072c27afc330d7 (patch) | |
tree | 74651d1697f1931dd76800f5e81ecc68fa64d689 /Doc | |
parent | 7a7f100eb352d08938ee0f5ba59c18f56dc4a7b5 (diff) | |
download | cpython-f7a6ff6fcab32a53f262ba3f8a072c27afc330d7.zip cpython-f7a6ff6fcab32a53f262ba3f8a072c27afc330d7.tar.gz cpython-f7a6ff6fcab32a53f262ba3f8a072c27afc330d7.tar.bz2 |
Warn that compile() can crash when compiling to an AST object (GH-6043)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/functions.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index bfb813c..3ddd280 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -274,6 +274,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. |