[Numpy-tickets] [NumPy] #371: Potential memory leak with numpy-1.0

NumPy numpy-tickets at scipy.net
Thu Nov 2 18:38:07 CST 2006

#371: Potential memory leak with numpy-1.0
 Reporter:  tepperly  |       Owner:  somebody
     Type:  defect    |      Status:  new     
 Priority:  normal    |   Milestone:          
Component:  Other     |     Version:          
 Severity:  normal    |    Keywords:          
 compiled python-2.5 with ./configure --enable-shared
 --without-pymalloc, and I defined #define'd
 Py_USING_MEMORY_DEBUGGER in Python-2.5/Objects/obmalloc.c

 If I run python -c "import numpy", I see some unfreed
 pointers in the numpy code. Here is the valgrind
 output for the potential leak:

 ==7786== 60 bytes in 10 blocks are still reachable in
 loss record 13 of 48
 ==7786== at 0x401A662: malloc (vg_replace_malloc.c:149)
 ==7786== by 0x49C807F: PyArray_NewFromDescr
 ==7786== by 0x49C54D3: PyArray_FromScalar
 ==7786== by 0x49CA561: PyArray_FromAny
 ==7786== by 0x49CA912: PyArray_CheckFromAny
 ==7786== by 0x4A04ED1: _array_fromobject
 ==7786== by 0x407224D: PyCFunction_Call
 ==7786== by 0x40B7CE4: call_function (ceval.c:3566)
 ==7786== by 0x40B5D3E: PyEval_EvalFrameEx (ceval.c:2269)
 ==7786== by 0x40B6729: PyEval_EvalCodeEx (ceval.c:2833)
 ==7786== by 0x40B7E1E: fast_function (ceval.c:3662)
 ==7786== by 0x40B7A38: call_function (ceval.c:3587)

 This looks like a potential leak. The whole valgrind
 output log is in the attached file memleak.txt. It also
 has a bigger stack trace.

Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/371>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list