[ python-Bugs-881641 ] Error in obmalloc.
SourceForge.net
noreply at sourceforge.net
Sun Jun 6 15:59:27 EDT 2004
Bugs item #881641, was opened at 2004-01-21 14:39
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=881641&group_id=5470
Category: Python Library
Group: Python 2.3
>Status: Closed
Resolution: Rejected
Priority: 5
Submitted By: Aki Tossavainen (cmouse)
Assigned to: Neal Norwitz (nnorwitz)
Summary: Error in obmalloc.
Initial Comment:
There appears to be some sort of problem with
obmalloc.c's PyObject_Free() function.
>From valgrind's output:
# more python.pid6399
==6399== Memcheck, a.k.a. Valgrind, a memory error
detector for x86-linux.
==6399== Copyright (C) 2002-2003, and GNU GPL'd, by
Julian Seward.
==6399== Using valgrind-2.0.0, a program supervision
framework for x86-linux.
==6399== Copyright (C) 2000-2003, and GNU GPL'd, by
Julian Seward.
==6399==
==6399== My PID = 6399, parent PID = 19903. Prog
and args are:
==6399== python
==6399== Estimated CPU clock rate is 1100 MHz
==6399== For more details, rerun with: -v
==6399==
==6399== Conditional jump or move depends on
uninitialised value(s)
==6399== at 0x4A9BDE74: PyObject_Free
(obmalloc.c:711)
==6399== by 0x4A9B8198: dictresize
(dictobject.c:477)
==6399== by 0x4A9C1B90: PyString_InternInPlace
(stringobject.c:4139)
==6399== by 0x4A9C1C42: PyString_InternFromString
(stringobject.c:4169)
==6399== by 0x4A9CBE27: add_operators
(typeobject.c:5200)
==6399== by 0x4A9C999C: PyType_Ready
(typeobject.c:3147)
==6399== by 0x4A9C9DAF: PyType_Ready
(typeobject.c:3115)
==6399== by 0x4A9BCFCF: _Py_ReadyTypes
(object.c:1961)
==6399== by 0x4AA1C78B: Py_Initialize
(pythonrun.c:172)
==6399== by 0x4AA252AB: Py_Main (main.c:370)
==6399== by 0x8048708: main (ccpython.cc:10)
==6399== by 0x4ABA391D: __libc_start_main (libc-
start.c:152)
==6399== by 0x8048630: (within /usr/bin/python)
==6399== Use of uninitialised value of size 4
==6399== at 0x4A9BDE7E: PyObject_Free
(obmalloc.c:711)
==6399== by 0x4A9B8198: dictresize
(dictobject.c:477)
==6399== by 0x4A9C1B90: PyString_InternInPlace
(stringobject.c:4139)
==6399== by 0x4A9C1C42: PyString_InternFromString
(stringobject.c:4169)
==6399== by 0x4A9CBE27: add_operators
(typeobject.c:5200)
==6399== by 0x4A9C999C: PyType_Ready
(typeobject.c:3147)
==6399== by 0x4A9C9DAF: PyType_Ready
(typeobject.c:3115)
==6399== by 0x4A9BCFCF: _Py_ReadyTypes
(object.c:1961)
==6399== by 0x4AA1C78B: Py_Initialize
(pythonrun.c:172)
==6399== by 0x4AA252AB: Py_Main (main.c:370)
==6399== by 0x8048708: main (ccpython.cc:10)
==6399== by 0x4ABA391D: __libc_start_main (libc-
start.c:152)
==6399== by 0x8048630: (within /usr/bin/python)
==6399== Invalid read of size 4
==6399== at 0x4A9BDE6F: PyObject_Free
(obmalloc.c:711)
==6399== by 0x4A9D3564: pmerge
(typeobject.c:1177)
==6399== by 0x4A9CCEFC: mro_implementation
(typeobject.c:1248)
==6399== by 0x4A9C85A7: mro_internal
(typeobject.c:1272)
==6399== by 0x4A9C9A3A: PyType_Ready
(typeobject.c:3163)
==6399== by 0x4A9BD031: _Py_ReadyTypes
(object.c:1976)
==6399== by 0x4AA1C78B: Py_Initialize
(pythonrun.c:172)
==6399== by 0x4AA252AB: Py_Main (main.c:370)
==6399== by 0x8048708: main (ccpython.cc:10)
==6399== by 0x4ABA391D: __libc_start_main (libc-
start.c:152)
==6399== by 0x8048630: (within /usr/bin/python)
==6399== Address 0x4BEAC010 is not stack'd,
malloc'd or free'd
and so on and so on. You can find valgrind from
http://valgrind.kde.org/
These lines show up in the log when I do
valgrind --num-callers=20 --logfile=python python
My version of Python is 2.3.2. You can find the original
logfile attached. All I did was start python and hit 'ctrl+d'
----------------------------------------------------------------------
>Comment By: Neal Norwitz (nnorwitz)
Date: 2004-06-06 15:59
Message:
Logged In: YES
user_id=33168
Checked in some fixes to improve use of valgrind. Most
importantly, you should read Misc/README.valgrind
* Objects/obmalloc.c 2.52 and 2.53
* Misc/README.valgrind 1.1
* Misc/valgrind-python.supp 1.1
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2004-01-22 11:11
Message:
Logged In: YES
user_id=33168
Heh, I recently found I didn't check in my valgrind patch.
I don't know what happened. I will do this when CVS comes
back. Unfortunately, it seems SF has been having CVS
problems (again) for a while now.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2004-01-22 11:06
Message:
Logged In: YES
user_id=6656
Hmm, the patch in the mail i referred you too never seems to
have got checked in, despite Tim telling Neal to :-)
Neal?
(can't do anything now, SF developer CVS is down)
----------------------------------------------------------------------
Comment By: Aki Tossavainen (cmouse)
Date: 2004-01-22 10:53
Message:
Logged In: YES
user_id=198027
Could you put into somewhere some suppression file you can
use with valgrind... so that no patching is required. If it's not
a real problem then it could be just suppressed.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2004-01-22 06:01
Message:
Logged In: YES
user_id=6656
Well, yeah, pymalloc engages in behaviour that is not in strict
conformance with the ANSI C standard. We knew this already. As
yet, no platform has been reported as having problems with this,
though.
If you want to use valgrind to look for real problems, reading
http://mail.python.org/pipermail/python-dev/2003-July/
036740.html
and the containing thread may be of interest (or you could just
turn pymalloc off at configure time).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=881641&group_id=5470
More information about the Python-bugs-list
mailing list