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 george-shuklin
Recipients george-shuklin
Date 2017-06-22.12:43:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1498135393.79.0.831850849211.issue30734@psf.upfronthosting.co.za>
In-reply-to
Content
If there is too many indexes python crashes:

a[0][0][0][0]....

segfault at 7ffd25fe6ff8 ip 0000564528c8cfe6 sp 00007ffd25fe7000 error 6 in python2.7[564528b6a000+324000]

code to generate code:

>>> i="[0]"*200000
>>> file('/tmp/bad_python.py','w').write('a=[]\na.append(a)\nprint(type(a'+i+'))\n')

python2 /tmp/bad_python.py 
Segmentation fault (core dumped)

python3 /tmp/bad_python.py 
RecursionError: maximum recursion depth exceeded during compilation

Just in case I upload generated code.

This bug affects both eval() function and python interpreter.
History
Date User Action Args
2017-06-22 12:43:13george-shuklinsetrecipients: + george-shuklin
2017-06-22 12:43:13george-shuklinsetmessageid: <1498135393.79.0.831850849211.issue30734@psf.upfronthosting.co.za>
2017-06-22 12:43:13george-shuklinlinkissue30734 messages
2017-06-22 12:43:13george-shuklincreate