Bug 600081 - disable optimized python malloc in debug build
Summary: disable optimized python malloc in debug build
Alias: None
Product: Fedora
Classification: Fedora
Component: python   
(Show other bugs)
Version: 14
Hardware: All Linux
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2010-06-03 22:18 UTC by John Dennis
Modified: 2012-08-15 20:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-15 20:29:37 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description John Dennis 2010-06-03 22:18:23 UTC
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.

Comment 1 Bug Zapper 2010-07-30 12:01:42 UTC
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:

Comment 2 Dave Malcolm 2012-08-15 20:29:37 UTC
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 <dmalcolm@redhat.com> - 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.

Note You need to log in before you can comment on or make changes to this bug.