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-05-16.07:58:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463385483.03.0.884960166366.issue26168@psf.upfronthosting.co.za>
In-reply-to
Content
Currently do_mktuple(), do_mklist() and do_mkdict() save references in a collection. I think that there are reasons to do this, and third-party code can be broken if just deallocate references. pybuildvalue_leak4.patch just implements this strategy more reliably. It guaranties (unless tuple allocation fails) that borrowed references in the same container or upper levels are kept until all content of the container is proceeded.

The more perfect solution is to allocate one list on error, save all references to it and deallocate it at the end of PyBuildValue(). But this leads to more complicated code.
History
Date User Action Args
2016-05-16 07:58:03serhiy.storchakasetrecipients: + serhiy.storchaka, mwh, rhettinger, shredwheat, martin.panter, josh.r, squidevil
2016-05-16 07:58:03serhiy.storchakasetmessageid: <1463385483.03.0.884960166366.issue26168@psf.upfronthosting.co.za>
2016-05-16 07:58:03serhiy.storchakalinkissue26168 messages
2016-05-16 07:58:02serhiy.storchakacreate