[New-bugs-announce] [issue26494] Double deallocation on iterator exhausting
Serhiy Storchaka
report at bugs.python.org
Sun Mar 6 13:26:04 EST 2016
New submission from Serhiy Storchaka:
Following example causes double deallocation of a sequence and crashing.
class A(list):
def __del__(self):
next(it)
it = iter(A())
next(it)
The same is for subclass of tuple, str, bytes and bytearray.
Proposed patch fixes this issue.
----------
components: Interpreter Core
files: free_after_iterating.patch
keywords: patch
messages: 261263
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Double deallocation on iterator exhausting
type: crash
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42080/free_after_iterating.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26494>
_______________________________________
More information about the New-bugs-announce
mailing list