diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-03-09 21:40:39 (GMT) |
---|---|---|
committer | Brett Cannon <brettcannon@users.noreply.github.com> | 2018-03-09 21:40:39 (GMT) |
commit | 19b42fe97cc15ff123f7ccb61a26fed817e850f7 (patch) | |
tree | 073ac25282592f82d4ce137ec8073e4280be2203 /Doc/library/functions.rst | |
parent | b316c44b0105d11a80ff971636143735f3655bbf (diff) | |
download | cpython-19b42fe97cc15ff123f7ccb61a26fed817e850f7.zip cpython-19b42fe97cc15ff123f7ccb61a26fed817e850f7.tar.gz cpython-19b42fe97cc15ff123f7ccb61a26fed817e850f7.tar.bz2 |
Warn that compile() can crash when compiling to an AST object (GH-6043) (GH-6046)
(cherry picked from commit f7a6ff6fcab32a53f262ba3f8a072c27afc330d7)
Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
Diffstat (limited to 'Doc/library/functions.rst')
-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 3b479bd..bc42030 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -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. |