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 vstinner
Recipients davin, larry, serhiy.storchaka, vstinner
Date 2017-10-26.10:03:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1509012193.26.0.213398074469.issue31626@psf.upfronthosting.co.za>
In-reply-to
Content
"the bug should be fixed in all affected versions"

I don't understand why you insist to change Python 3.4 and Python 3.5. IMHO this issue only impacts OpenBSD.


"The current code in not correct on all platforms. We don't know how many of random bugs, hangs and crashes on other platforms are caused by this bug. I'm not surprised that it was caught on OpenBSD since the robustness and security of software is the goal of OpenBSD."

I'm not aware of these "random bugs, hangs and crashes on other platforms". Did you hear someone complaining about random crashes in Python?

We are running the Python suite multiple times per time on a large farm of buildbot workers. I  never saw the crashes that you mentionned.

IMHO it's very unlikely or impossible that _PyMem_DebugRawRealloc() erases bytes of a memory block that was just unallocated while another thread uses this new memory block for a new allocation. Most, if not all, calls to _PyMem_DebugRawRealloc() are protected by the GIL. If there is a single thread using the memory block, I think that it's perfectly fine to write after it's deallocated.

Well, maybe I'm plain wrong, and it's possible that shrinking a memory block makes the unallocator memory block really unaccessible, and that the memcpy() after the realloc() triggers a big crash. But I would like to *see* such crash to really be convinced :-)
History
Date User Action Args
2017-10-26 10:03:13vstinnersetrecipients: + vstinner, larry, serhiy.storchaka, davin
2017-10-26 10:03:13vstinnersetmessageid: <1509012193.26.0.213398074469.issue31626@psf.upfronthosting.co.za>
2017-10-26 10:03:13vstinnerlinkissue31626 messages
2017-10-26 10:03:13vstinnercreate