Refcount problem in ceval.c

Christian Heimes lists at cheimes.de
Wed Sep 10 11:32:18 EDT 2008


Berthold Höllmann wrote:
> Is there any "common" reason to for such a strange object on the command
> stack, or is it more likely that any of my extension modules is causing
> havoc?

It's very likely that your extension has a reference counting bug. It 
looks like you are either missing a Py_INCREF or you have a Py_DECREF 
too much. Newly freed memory is filled with 0xDB (see Objects/obmalloc.c 
DEADBYTE).

Wild guess: Are you using PyModule_AddObject with a PyTypeObject w/o 
Py_INCREF()ing the type object first?

Christian




More information about the Python-list mailing list