[issue7788] segfault when deleting from a list using slice with very big `step' value

Jan Kaliszewski report at bugs.python.org
Tue Jan 26 20:16:09 CET 2010


Jan Kaliszewski <zuo at chopin.edu.pl> added the comment:

Interesting that in Py2.5...

>>> del range(10)[::maxint]

...this causes segfault but in Py2.6 is ok, as well as in Py3.0 (with maxsize insetad of maxint). (That's why I didn't noticed that it concerns newer version than 2.5, and marked only 2.5).

But, as Ezio noted, e.g.:

>>> del range(10)[5::maxint]

...crashes all of them, e.g:

Python 3.0.1+ (r301:69556, Apr 15 2009, 15:59:22)
[GCC 4.3.3] on linux2
>>> from sys import maxsize
>>> del list(range(10))[::maxsize]  # <- OK
>>> del list(range(10))[5::maxsize]
Segmentation fault

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7788>
_______________________________________


More information about the Python-bugs-list mailing list