*** glibc detected *** gdb: malloc(): smallbin double linked list

Nobody nobody at nowhere.com
Fri Nov 5 22:30:17 CET 2010


On Fri, 05 Nov 2010 19:39:12 +0000, John Reid wrote:

> I've compiled
> Python 2.7 (r27:82500, Nov  2 2010, 09:00:37) [GCC 4.4.3] on linux2
> 
> with the following configure options
> ./configure --prefix=/home/john/local/python-dbg --with-pydebug
> 
> I've installed numpy and some other packages but when I try to run my
> extension code under gdb I get the errors below. Does anyone have any
> ideas of how to track down what's happening here? I imagine I've
> misconfigured something somewhere. Is valgrind the answer?

I imagine that your extension code is trashing the heap, in which case,
valgrind is probably the answer.

My first guess would be that something is writing to a heap block after it
has been deallocated (possibly due to omitting a Py_INCREF). Of course,
other causes are possible, but writing to deallocated memory is a common
problem when writing extensions for languages with garbage collection.




More information about the Python-list mailing list