bpo-32758: Warn that compile() can crash when compiling to an AST obj… · python/cpython@8eb27cc (original) (raw)

Original file line number Diff line number Diff line change
@@ -248,6 +248,12 @@ section.
248 248 character. This is to facilitate detection of incomplete and complete
249 249 statements in the :mod:`code` module.
250 250
251 + .. warning::
252 +
253 + It is possible to crash the Python interpreter with a
254 + sufficiently large/complex string when compiling to an AST
255 + object due to stack depth limitations in Python's AST compiler.
256 +
251 257 .. versionchanged:: 2.3
252 258 The *flags* and *dont_inherit* arguments were added.
253 259