This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients BTaskaya, rhettinger, serhiy.storchaka
Date 2020-05-04.12:24:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588595081.09.0.125278791941.issue39159@roundup.psfhosted.org>
In-reply-to
Content
It can also crash.

    ast.literal_eval('+0'*10**6)

The cause is that all AST handling C code (in particularly converting the AST from C to Python) is recursive, and therefore can overflow the C stack. Some recursive code has arbitrary limits which cause raising exceptions like MemoryError in the initial example, but not all code has such checks.
History
Date User Action Args
2020-05-04 12:24:41serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, BTaskaya
2020-05-04 12:24:41serhiy.storchakasetmessageid: <1588595081.09.0.125278791941.issue39159@roundup.psfhosted.org>
2020-05-04 12:24:41serhiy.storchakalinkissue39159 messages
2020-05-04 12:24:40serhiy.storchakacreate