Author serhiy.storchaka
Recipients davin, larry, serhiy.storchaka, vstinner
Date 2017-10-25.16:09:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1508947762.51.0.213398074469.issue31626@psf.upfronthosting.co.za>
In-reply-to
Content
In this case it would be safe to not erase bytes at all.

PR 4119 is too complex for a bugfix (especially if backport it to 3.5 and 3.4). It can introduce other regressions. The performance hit is not the only issue. Allocating a temporary buffer can change the structure of "holes" in memory. As result some memory related bugs can be reproducible only in release mode.

Maybe it is enough to erase only few bytes at the start and end of the freed area. The copy can be saved in local variables, without involving the heap. This solution still will be enough complex, and I think it can be applied only to 3.7. But the bug should be fixed in all affected versions.
History
Date User Action Args
2017-10-25 16:09:22serhiy.storchakasetrecipients: + serhiy.storchaka, vstinner, larry, davin
2017-10-25 16:09:22serhiy.storchakasetmessageid: <1508947762.51.0.213398074469.issue31626@psf.upfronthosting.co.za>
2017-10-25 16:09:22serhiy.storchakalinkissue31626 messages
2017-10-25 16:09:22serhiy.storchakacreate