GNOME Bugzilla – Bug 704278
Possible crash when destroying a tick callback
Last modified: 2013-08-30 15:27:17 UTC
I'm noticing this when running make check in pygobject with G_SLICE=always-malloc. gtk_widget_remove_tick_callbacks loops through the list of callbacks and calls destroy_tick_callback_info, which ultimately calls g_list_delete_link on the list that is being iterated over, so it is not safe to use the pointer to the original list after this in order to fetch the next item.
Created attachment 249231 [details] [review] Proposed patch. I'm assuming that it isn't possible to have multiple callbacks in the list with the same id. Otherwise it would be better to fetch l->next before destroying the callback and continue iterating.
Comment on attachment 249231 [details] [review] Proposed patch. Commit d7e07a.