From: Ashley Whetter Date: Fri, 18 Oct 2019 08:00:03 +0000 (-0700) Subject: bpo-32758: Warn that compile() can crash when compiling to an AST object (GH-6043... X-Git-Tag: v2.7.17~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eb27cc35489848596d9fb4b1c91fac00ae75d21;p=thirdparty%2FPython%2Fcpython.git 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 --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 8701f9d8ffb0..23f34a3de0f0 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.