GNOME Bugzilla – Bug 701283
g_source_add_child_source() segfault
Last modified: 2013-10-17 14:36:20 UTC
Created attachment 245651 [details] [review] possible patch in g_source_add_child_source() we assert that the child_source has no context. If the source is blocked, we try to block the new child source as well (before attaching it to the context). in block_source we call g_main_context_remove_poll_unlocked() with the child_source context (which is NULL) and we get a segfault. I believe two things need to be done: 1) when blocking a source without a context, don't call g_main_context_remove_poll_unlocked() with the NULL context. 2) when calling g_source_attach with a blocked source, don't call g_main_context_add_poll_unlocked() this is similar to how g_source_add_poll() and others deals with blocked sources.
Dan, I think child sources were your invention ?
Comment on attachment 245651 [details] [review] possible patch yes, sounds right
Please commit for me, I don't have that power..
pushed, along with a test case
*** Bug 710394 has been marked as a duplicate of this bug. ***