Summary: | dbus_g_proxy_new_for_peer, on a bus, causes crashes | ||
---|---|---|---|
Product: | dbus | Reporter: | Simon McVittie <smcv> |
Component: | GLib | Assignee: | Simon McVittie <smcv> |
Status: | RESOLVED FIXED | QA Contact: | John (J5) Palmieri <johnp> |
Severity: | normal | ||
Priority: | medium | CC: | alban.crequy, rob.taylor |
Version: | unspecified | Keywords: | patch |
Hardware: | Other | ||
OS: | All | ||
URL: | http://cgit.freedesktop.org/~smcv/dbus-glib/log/?h=proxy-peer-bus-41126 | ||
Whiteboard: | review+ | ||
i915 platform: | i915 features: | ||
Bug Depends on: | 40151 | ||
Bug Blocks: | 41129 | ||
Attachments: |
Fix two crashes when dbus_g_proxy_new_for_peer is used on a bus
Add a utility function to tear down a private connection in tests [1/2] Add a utility function to tear down a private connection in tests [2/2] Fix two crashes when dbus_g_proxy_new_for_peer is used on a bus |
Description
Simon McVittie
2011-09-22 11:15:15 UTC
Created attachment 51526 [details] [review] Fix two crashes when dbus_g_proxy_new_for_peer is used on a bus The first part of the bug is that when NameOwnerChanged is received with a dbus_g_proxy_new_for_peer (which has no name) alive, checking whether it was affected by the NameOwnerChanged caused a NULL dereference and segfault. The second part of the bug is that if the last proxy in existence is for a peer, when it was unregistered there would be no owner_match_rules, causing a crash. Both are exercised in the new test added here. Created attachment 51527 [details] [review] Add a utility function to tear down a private connection in tests The test added in Attachment #51526 [details] needs this, too. Created attachment 60057 [details] [review] [1/2] Add a utility function to tear down a private connection in tests --- Rebased onto the branch from Bug #40151, since that branch is required in order to make tests pass again. Created attachment 60058 [details] [review] [2/2] Fix two crashes when dbus_g_proxy_new_for_peer is used on a bus The first part of the bug is that when NameOwnerChanged is received with a dbus_g_proxy_new_for_peer (which has no name) alive, checking whether it was affected by the NameOwnerChanged caused a NULL dereference and segfault. The second part of the bug is that if the last proxy in existence is for a peer, when it was unregistered there would be no owner_match_rules, causing a crash. Both are exercised in the new test added here. --- Also rebased onto Bug #40151. Comment on attachment 60057 [details] [review] [1/2] Add a utility function to tear down a private connection in tests Review of attachment 60057 [details] [review]: ----------------------------------------------------------------- Looks good. Comment on attachment 60058 [details] [review] [2/2] Fix two crashes when dbus_g_proxy_new_for_peer is used on a bus Review of attachment 60058 [details] [review]: ----------------------------------------------------------------- Great, ship it. Thanks, fixed in git for 0.100 |
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.