GNOME Bugzilla – Bug 647757
[bin] Doesn't check if an element is still a child before changing the state
Last modified: 2011-05-14 10:12:32 UTC
See attached patch, the element could be removed between getting it from the iterator and setting its state
Created attachment 185944 [details] [review] bin: Check if an element is still child of the bin before changing the state Fixes bug #647757.
of course there's still a small race here, the element could be removed between checking and before setting the state.
There is not so much one can do for those races. The effect of a concurrent remove and set_state however is always something of the following after both methods complete: 1) the element is removed before the state is set 2) the element is removed after the state is set That's perfectly normal behaviour if you do uncontrolled simultaneous execution of those 2 methods.
So... would you like to see this patch in, which helps a bit, or just keep it as is? The patch doesn't help that much ;)
Oh well, let's close this. There's nothing we can do here to fix it completely :)