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 vstinner
Recipients Kevin.Dyer, josh.r, ncoghlan, vstinner
Date 2014-10-09.11:46:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1412855186.42.0.706481176595.issue22583@psf.upfronthosting.co.za>
In-reply-to
Content
> You're supposed to use that code to create a file (the output file is just ""+""+""+""+""+""+""+""+""+...+"").

Oh ok, the bug is in Python compiler. It's probably an overflow of the C stack.

The bug was fixed in Python 3.3 by the issue #5765: see changeset ab02cd145f56. See also the issue #19098 ("sys.setrecursionlimit(2**30) breaks interactive shell") and the changeset c3df31cbcd0a.

Nick Coghlan wrote in the issue #5765: "However, agreed on the won't fix for 3.2 and 2.7, although I'd consider it at least for 2.7 if someone went through and worked out a patch that applies cleanly."


$ python2
Python 2.7.5 (default, Sep 25 2014, 13:57:38) 
[GCC 4.8.3 20140911 (Red Hat 4.8.3-7)] on linux2>>> compile('1' + '+1'*10**5, '<string>', 'exec')
<code object <module> at 0x7f8c5ba2c1b0, file "<string>", line 1>
>>> compile('1' + '+1'*10**6, '<string>', 'exec')
Erreur de segmentation (core dumped)

$ python3
Python 3.3.2 (default, Jun 30 2014, 17:20:03) 
[GCC 4.8.3 20140624 (Red Hat 4.8.3-1)] on linux
>>> compile('1' + '+1'*10**3, '<string>', 'exec')
<code object <module> at 0x7f7298d479c0, file "<string>", line 1>
>>> compile('1' + '+1'*10**4, '<string>', 'exec')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: maximum recursion depth exceeded during compilation
History
Date User Action Args
2014-10-09 11:46:26vstinnersetrecipients: + vstinner, ncoghlan, josh.r, Kevin.Dyer
2014-10-09 11:46:26vstinnersetmessageid: <1412855186.42.0.706481176595.issue22583@psf.upfronthosting.co.za>
2014-10-09 11:46:26vstinnerlinkissue22583 messages
2014-10-09 11:46:25vstinnercreate