PyMem_MALLOC (was [Python-Dev] Snake farm) (original) (raw)

Marc Recht marc@informatik.uni-bremen.de
Fri, 22 Nov 2002 16:19:27 +0100


> So it looks like PyOblectFree() was called with 0x800 as an argument, > which is a bogus pointer value. Can you go up one stack level and see > what the value of k in functioncall() is? 713 if (ADDRESSINRANGE(p, pool->arenaindex)) { (gdb) up # 1 0x080dfef4 in functioncall (func=0x826317c, arg=0x8256aac, kw=0x8269bdc) at Objects/funcobject.c:481 481 PyMemDEL(k); (gdb) p k $1 = (struct object **) 0x800 Well, then maybe you can follow MvL's suggestion and find out how come this value was returned by PyMemNEW(PyObject , 2nk)??? The problem seems to be in the FreeBSD malloc implementation. malloc(0) returns 0x800 in all my tests. malloc(1) and up seems to work properly..

HTH, Marc