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 serhiy.storchaka
Recipients rhettinger, serhiy.storchaka
Date 2016-03-06.18:26:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457288764.94.0.168287313304.issue26494@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-03-06 18:26:05serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger
2016-03-06 18:26:04serhiy.storchakasetmessageid: <1457288764.94.0.168287313304.issue26494@psf.upfronthosting.co.za>
2016-03-06 18:26:04serhiy.storchakalinkissue26494 messages
2016-03-06 18:26:04serhiy.storchakacreate