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 benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov
Date 2018-02-03.18:22:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za>
In-reply-to
Content
Python 2 can crash when compile long expression. 

>>> x = eval('""' + '+chr(33)'*100000)
Segmentation fault (core dumped)

This was fixed in Python 3. RecursionError is raised now.

>>> x = eval('""' + '+chr(33)'*100000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RecursionError: maximum recursion depth exceeded during compilation
>>> x = eval('+chr(33)'*1000000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RecursionError: maximum recursion depth exceeded during compilation

But compiling to AST still can crash.

>>> import ast
>>> x = ast.parse('+chr(33)'*1000000)
Segmentation fault (core dumped)
History
Date User Action Args
2018-02-03 18:22:51serhiy.storchakasetrecipients: + serhiy.storchaka, brett.cannon, ncoghlan, benjamin.peterson, yselivanov
2018-02-03 18:22:51serhiy.storchakasetmessageid: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za>
2018-02-03 18:22:51serhiy.storchakalinkissue32758 messages
2018-02-03 18:22:50serhiy.storchakacreate