[snake-farm] Re: [Python-Dev] Snake farm

Martin v. Loewis martin@v.loewis.de
11 Nov 2002 13:43:57 +0100


Marc Recht <marc@informatik.uni-bremen.de> writes:

> #0  0x080779c0 in PyObject_Free (p=0x800) at Objects/obmalloc.c:713
> #1  0x080e00a0 in function_call (func=0x82641ec, arg=0x8258b8c,
> kw=0x826bbdc) at Objects/funcobject.c:481

This looks like it is getting difficult. 0x800 is surely a garbage
pointer, so it is not surprising that pymalloc crashes when it sees
that pointer.

Now, the question is: where does that pointer come from? This should
be from funcobject.c:457, which says

		k = PyMem_NEW(PyObject *, 2*nk);

Unless I'm mistaken, this expands to malloc(). Can you please try to
confirm that malloc indeed return this 0x800? If so, it looks like the
C library's malloc got confused. We would then need to find out why
that happens.

If you can't come up with a debugging strategy, I recommend that you
try out Tim's suggestion (ie. build with optimizations disabled). In
addition, I also suggest that you build with threads disabled. Of
course, if you then cannot reproduce the problem anymore, this is
little proof that the problem has to do with optimization, or threads
:-(

Regards,
Martin