Bug 35115 - crash when switching to a new main loop context
Summary: crash when switching to a new main loop context
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: GLib (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Rob Taylor
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-03-08 05:39 UTC by Mike Gorse
Modified: 2011-05-12 04:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch. (1.05 KB, patch)
2011-03-08 05:39 UTC, Mike Gorse
Details | Splinter Review
patch; same as before but with --format-patch (1.44 KB, patch)
2011-03-11 07:33 UTC, Mike Gorse
Details | Splinter Review

Description Mike Gorse 2011-03-08 05:39:08 UTC
Created attachment 44228 [details] [review]
Patch.

When dbus_*_setup_with_g_main gets called to move a connection to a new main loop context, connection_setup_new_from_old is called.  It tries to iterate through ios and timeouts on the old context.  However, it calls dbus_watch_set_data, which ias the side-effect of freeing the old data, which has the side-effect of removing the handler from the old context, so we set tmp to tmp->next where tmp now points to an element which has just been freed.
Comment 1 Mike Gorse 2011-03-11 07:33:42 UTC
Created attachment 44359 [details] [review]
patch; same as before but with --format-patch
Comment 2 Simon McVittie 2011-05-12 04:31:14 UTC
The regression test for Bug #30574 seems to exhibit this when run under valgrind.
Comment 3 Simon McVittie 2011-05-12 04:34:43 UTC
Thanks, fixed in git for 0.94.


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.