From 8eb27cc35489848596d9fb4b1c91fac00ae75d21 Mon Sep 17 00:00:00 2001 From: Ashley Whetter Date: Fri, 18 Oct 2019 01:00:03 -0700 Subject: 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 --- Doc/library/functions.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 8701f9d..23f34a3 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. -- cgit v0.12