python-dbus-next icon indicating copy to clipboard operation
python-dbus-next copied to clipboard

glib: destroy the _AuthLineSource explicitly

Open whot opened this issue 3 years ago • 0 comments

See https://gitlab.gnome.org/GNOME/pygobject/-/issues/525 for an explanation, the summary is: we need to explicitly call source.destroy() if dispatch returns GLib.SOURCE_REMOVE.

Deleting the source by resetting it to None causes invalid memory accesses and eventual crashes.

This can be reproduced with a basic call to

    bus = dbus_next.glib.MessageBus(bus_type=dbus_next.BusType.SESSION).connect_sync()

and a GLib.MainLoop() after this call. Run in valgrind --tool=memcheck.

Fixes #113

whot avatar Mar 22 '22 12:03 whot