[Python-checkins] bpo-32758: Warn that compile() can crash when compiling to an AST object (GH-6043) (GH-16566)
Serhiy Storchaka
webhook-mailer at python.org
Fri Oct 18 04:00:07 EDT 2019
https://github.com/python/cpython/commit/8eb27cc35489848596d9fb4b1c91fac00ae75d21
commit: 8eb27cc35489848596d9fb4b1c91fac00ae75d21
branch: 2.7
author: Ashley Whetter <AWhetter at users.noreply.github.com>
committer: Serhiy Storchaka <storchaka at gmail.com>
date: 2019-10-18T11:00:03+03:00
summary:
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 at users.noreply.github.com>
files:
M Doc/library/functions.rst
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 8701f9d8ffb0e..23f34a3de0f05 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.
More information about the Python-checkins
mailing list