This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients effbot, georg.brandl, vstinner
Date 2008-07-14.02:08:32
SpamBayes Score 1.8560053e-05
Marked as misclassified No
Message-id <1216001314.61.0.998151536538.issue3299@psf.upfronthosting.co.za>
In-reply-to
Content
F*ck, Firefox just crashed! I have to rewrite my long comment...

First, to explain why the problem only occurs in pydebug mode: a 
PyObject has only _ob_next and _ob_prev attributes if Py_TRACE_REFS is 
set (eg. by pydebug). PyObject_NEW() and PyObject_NEW_VAR() call 
PyObject_Init() which register the new object to the object list, 
whereas PyObject_DEL() only free the memory.

PyObject_DEL() doesn't the dealloc() method nor removing the object 
from the object list. So Py_DECREF() should be used instead: it calls 
the dealloc method and remove the object from the object list.

PyObject_DEL() is misused in _sre and in curses modules. See attached 
patches.
History
Date User Action Args
2008-07-14 02:08:35vstinnersetspambayes_score: 1.85601e-05 -> 1.8560053e-05
recipients: + vstinner, effbot, georg.brandl
2008-07-14 02:08:34vstinnersetspambayes_score: 1.85601e-05 -> 1.85601e-05
messageid: <1216001314.61.0.998151536538.issue3299@psf.upfronthosting.co.za>
2008-07-14 02:08:33vstinnerlinkissue3299 messages
2008-07-14 02:08:33vstinnercreate