Red Hat Bugzilla – Bug 600081
disable optimized python malloc in debug build
Last modified: 2012-08-15 16:29:37 EDT
Python has it's own optimized malloc in obmalloc.c which supersedes the system malloc in some instances. When using valgrind it's essential only the system malloc be used otherwise valgrind has the potential to miss various errors. This has been directly confirmed in various debug sessions.
--without-pymalloc should be passed to configure to disable using the optimized internal malloc.
This should make debugging memory problems easier and more reliable.
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle.
Changing version to '14'.
More information and reason for this action is here:
Sorry for not responding earlier. python has for a while now detected when it is running under valgrind, and turns off the optimized malloc when it is.
For Fedora, this first appeared in this fix cherrypicked from upstream:
* Wed Dec 16 2009 David Malcolm <firstname.lastname@example.org> - 2.6.4-4
- automatically disable arena allocator when run under valgrind (upstream
issue 2422; patch 52)
and the patch made it upstream as of 2.7-0.1.rc1.
FWIW I also backported it to RHEL: it's in RHEL 5 as of 2.4.3-40 onwards (see bug 569093), and in RHEL 6.0.
Hope this is helpful.