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 josh.r, martin.panter, mwh, rhettinger, serhiy.storchaka, shredwheat, squidevil
Date 2016-01-30.11:23:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1454153020.0.0.629955803415.issue26168@psf.upfronthosting.co.za>
In-reply-to
Content
Previous attempt to fix reference leaks was in issue984722.

Proposed patch uses different approach. It correctly fixes reference leaks after error in processing dict items (like "{()s(())N"), fixes leaksafter memory errors on creating tuple, list or dict, fixes issue20024 for lists and dicts, fixes use-after-free issue described in msg259242.

But the patch has a disadvantage in comparison with current code. If user converter ("O&") accepts Python objects and steal its reference (as "N"), this reference will be leaked. This is a price for avoiding potential use-after-free issues. Current stdlib code doesn't use converters that steal Python object reference. May be we should document this limitation.
History
Date User Action Args
2016-01-30 11:23:40serhiy.storchakasetrecipients: + serhiy.storchaka, mwh, rhettinger, shredwheat, martin.panter, josh.r, squidevil
2016-01-30 11:23:40serhiy.storchakasetmessageid: <1454153020.0.0.629955803415.issue26168@psf.upfronthosting.co.za>
2016-01-30 11:23:39serhiy.storchakalinkissue26168 messages
2016-01-30 11:23:37serhiy.storchakacreate