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 amaury.forgeotdarc
Recipients Kai.Sterker, amaury.forgeotdarc, jcea
Date 2012-07-01.21:26:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1341177979.71.0.0477822447949.issue15236@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, some INCREF may be missing.  The issue may be with the callback mechanism; these are usually difficult to get right.

Actually by pure luck I found suspect code that may be the cause of this crash:
in src/event/listener_python.cc, the "Args" tuple is first allocated, but item #1 is not set.  It's a bit wrong (try to print it!) but if does not leak outside, it won't probably crash here; gc traverse function luckily skips NULL pointers.
BUT in raise_event(), this Args[1] is set to an event object, which is DECREF'd afterwards.  The pointer now points to invalid memory, and next gc.collect() will crash...

I also found other issues with reference counting here and there (ex: in src/python/python.cc, PyTuple_SET_ITEM (new_tuple, i, Py_None) steals one reference to Py_None each time!)

There are many bugs in this application to fix before we can impute CPython.
History
Date User Action Args
2012-07-01 21:26:19amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, jcea, Kai.Sterker
2012-07-01 21:26:19amaury.forgeotdarcsetmessageid: <1341177979.71.0.0477822447949.issue15236@psf.upfronthosting.co.za>
2012-07-01 21:26:19amaury.forgeotdarclinkissue15236 messages
2012-07-01 21:26:18amaury.forgeotdarccreate