[pygtk] [patch] crash bug in gobject.Timeout and gobject.Idle

Bryan Silverthorn bcs26 at cornell.edu
Fri Jan 11 00:32:11 WST 2008


Shameless patch-plug: I'd like to call attention to bug #504337, which
has a (very) small patch fixing, I hope, a fairly significant bug in
pygobject's Timeout and Idle bindings. I've pasted my original bug
report below.

"
The tp_flags fields for PyGTimeout_Type and PyGIdle_Type in
gobject/pygsource.c have Py_TPFLAGS_HAVE_GC incorrectly set. The
tp_traverse and tp_clear fields are only inherited from a base type if
Py_TPFLAGS_HAVE_GC is _not_ set in subtypes (and if
Py_TPFLAGS_HAVE_RICHCOMPARE _is_ set, which is covered by
Py_TPFLAGS_DEFAULT).

The Python GC therefore dereferences a NULL function pointer when
attempting to traverse a timeout or idle source.
"

Thanks!

----
Bryan Silverthorn


More information about the pygtk mailing list