[issue23985] Crash when deleting slices from duplicated bytearray
Wolfgang Maier
report at bugs.python.org
Fri Apr 17 12:12:10 CEST 2015
Wolfgang Maier added the comment:
Surprisingly, a much simpler version with just one bytearray seems to run stably (for several minutes at least), but when you wait a while then hit Ctrl-C, you are getting a Segmentation fault:
Python 3.4.0 (default, Apr 11 2014, 13:05:11)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
>>> buf1 = bytearray()
>>> data = b"1234567890123"
>>>
>>> while True:
... buf1 += data
... l = len(buf1)
... n = random.randrange(1, l-1)
... del buf1[:n]
...
^CSegmentation fault (core dumped)
The same code crashes spontaneously (without attempting a keyboard interrupt) when run in IDLE.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23985>
_______________________________________
More information about the Python-bugs-list
mailing list