Bug 600081 - disable optimized python malloc in debug build
disable optimized python malloc in debug build
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: python (Show other bugs)
14
All Linux
low Severity medium
: ---
: ---
Assigned To: Dave Malcolm
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-03 18:18 EDT by John Dennis
Modified: 2012-08-15 16:29 EDT (History)
4 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description John Dennis 2010-06-03 18:18:23 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.
Comment 1 Bug Zapper 2010-07-30 08:01:42 EDT
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Dave Malcolm 2012-08-15 16:29:37 EDT
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.