GNOME Bugzilla – Bug 760330
idle-monitor-xsync: fix crash if watch callback removes different watch
Last modified: 2016-01-11 16:25:20 UTC
Right now the XSync based idle monitoring code, will fetch all active watches into a list, and then call their watch callbacks one by one as necessary. If one watch callback invalidates another watch, the list will contain free'd memory. This commit makes sure to consult the hash table after ever call of a watch callback, to ensure mutter never looks at freed memory. Fixes crash reported on IRC by Laine Stump with his synergy setup.
Created attachment 318534 [details] [review] idle-monitor-xsync: fix crash if watch callback removes different watch
oh hang on, i manually frobbed the patch file when doing a test rpm build and didn't update git.
Created attachment 318536 [details] [review] idle-monitor-xsync: fix crash if watch callback removes different watch Right now the XSync based idle monitoring code, will fetch all active watches into a list, and then call their watch callbacks one by one as necessary. If one watch callback invalidates another watch, the list will contain free'd memory. This commit makes sure to consult the hash table after ever call of a watch callback, to ensure mutter never looks at freed memory. Fixes crash reported on IRC by Laine Stump with his synergy setup.
Review of attachment 318536 [details] [review]: Looks good. See also bug 760476
Attachment 318536 [details] pushed as 42b3a34 - idle-monitor-xsync: fix crash if watch callback removes different watch