Prev: Ancient C string conventions (was Re: Why Is Escaping DataConsidered So Magical?)
Next: Hwy doesn't len(None) return zero ?
From: Thomas Jollans on 30 Jun 2010 05:56 On 06/30/2010 11:39 AM, Sunil wrote: > Hi, > > We are using a legacy product which is using 1.5.1 version of Python and > we have seen frequent core dumps offlate which is as below > > #0 0x2b79b0 in list_dealloc (op=0x414b11d0) at listobject.c:220 > #1 0x283c48 in dict_dealloc (mp=0x415b8c18) at dictobject.c:491 > #2 0x2b4760 in frame_dealloc (f=0x4042ea50) at frameobject.c:116 > #3 0x28b938 in eval_code2 (co=0x404a4d28, globals=0x4049bec8, > locals=0x0, args=0x404da5dc, argcount=1, kws=0x0, kwcount=0, defs=0x0, > defcount=0, owner=0x0) > at ceval.c:1873 > #4 0x28d690 in call_function (func=0x41497958, arg=0x404da5d0, kw=0x0) > at ceval.c:2472 > > Can someone confirm if this is a problem at Python or in the source > code, I know that this version is quite old and needs upgarde, but since > this in use for long i would need evidence to prove that this is a > problem at Python not in the product so that we can upgrade to the > latest version. > > listobject.c > for (i = 0; i < op->ob_size; i++) { > Py_XDECREF(op->ob_item[i]); //Line 220 > } > > Can some one help me out in this, while i belive that the pointer where > the derefernece is happening might have got corrupted but this happens > rarely and the code is a provisioning script with a command that is > successful most times. I can't really help much as I've never used Python versions that old. Some thoughts: * are you using C extension modules? If you are, double-check their increfs and decrefs. * if you're using pure-Python code, the bug is in Python. Python scripts have no access to memory management and refcounting details (or do they?) and thus can't currupt anything at that level. * see http://www.python.org/download/releases/1.6.1/ : --> What's new in release 1.6.1? - A core dump in the C API function PyList_Reverse() has been fixed. possibly relevant? -- Thomas |