Summary: | Dbus-glib doesn't partake in dbus watch reference counting causing crash in the error unwind | ||
---|---|---|---|
Product: | dbus | Reporter: | James Westby <jw+debian> |
Component: | GLib | Assignee: | Rob Taylor <rob.taylor> |
Status: | RESOLVED DUPLICATE | QA Contact: | John (J5) Palmieri <johnp> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.2.x | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
James Westby
2009-10-08 17:10:37 UTC
(In reply to comment #0) > It looks to me as though dbus-glib isn't taking part in dbus' reference > counting: Nothing outside libdbus can take part in DBusWatch refcounting, because _dbus_watch_unref is private to libdbus. > if (watch->refcount == 0) > { > dbus_watch_set_data (watch, NULL, NULL); /* call free_data_function */ ... > if (handler->watch) > dbus_watch_set_data (handler->watch, NULL, NULL); It should be fine that this can be called twice: it's setting the watch's user-data to NULL, but simultaneously setting the user-data free-function to NULL, so the old free-function will only be called on the old user-data, and only once. Also, io_handler_watch_freed sets handler->watch to NULL, and io_handler_source_finalized only calls dbus_watch_set_data if the watch has not been freed; so it can only be called once anyway, as far as I can see. I don't think this crash is necessarily dbus-glib's fault. A regression test would probably be useful: perhaps it could connect a peer-to-peer DBus(G)Connection to a listening Unix socket, and have the listening socket authenticate correctly but then send meaningless data instead of a valid message. I think this is probably the same thing as Bug #15578 in libdbus; nobody has reproduced that one either. *** This bug has been marked as a duplicate of bug 15578 *** |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.