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 lemburg, python-dev, serhiy.storchaka, vstinner
Date 2016-03-09.14:25:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1457533558.77.0.479739686796.issue26516@psf.upfronthosting.co.za>
In-reply-to
Content
When I wrote the PEP 445, I already proposed to add a new environment variable to install debug hooks on a Python compiled in release mode:

https://www.python.org/dev/peps/pep-0445/#add-a-new-pydebugmalloc-environment-variable

But the proposition was rejected because of the PEP 432, but 3 years later, this PEP is still stuck at the draft state. So I propose to move on.

Anyway, PYTHONMALLOC is really a corner case since it must be read *very early* (first instruction of main()).


Oh by the way, I forgot to explain the initial motivation for this change! It's the issue #26249: "Change PyMem_Malloc to use pymalloc allocator". With this change, applications misuing PyMem_Malloc API (ex: alloc memory with PyMem_Malloc(), free memory with free()) will start to crash. PYTHONMALLOC=debug should help these applications to detect bugs easier and get an obvious error message.
History
Date User Action Args
2016-03-09 14:25:58vstinnersetrecipients: + vstinner, lemburg, python-dev, serhiy.storchaka
2016-03-09 14:25:58vstinnersetmessageid: <1457533558.77.0.479739686796.issue26516@psf.upfronthosting.co.za>
2016-03-09 14:25:58vstinnerlinkissue26516 messages
2016-03-09 14:25:58vstinnercreate