fixed bug in wl_list
iskren.chernev at gmail.com
Sat Mar 12 04:01:44 PST 2011
Well, the actual problem is that something was removed twice. And I know
where this place is, but I couldn't know if you would like to remove
elements multiple times with no problems, or treat the list very carefully
and remove elements only once. But then there should be a way to know if an
element is already in a list or not. So if there is a way to know that, why
not make a check inside wl_list_remove, just to make sure.
I'll fix it the way you want it to be :)
On Sat, Mar 12, 2011 at 1:07 PM, Marty Jack <martyj19 at comcast.net> wrote:
> On 03/11/2011 07:32 PM, Iskren Chernev wrote:
> > Hello,
> > I found a bug and fixed it with the patch :)
> > *to reproduce:*
> > run compositor on top of x11
> > repeat
> > run flower
> > drag & drop it a little
> > move the pointer in and out of the compositor/flower
> > Ctrl+C the flower client
> > it would break eventually
> > *problem:*
> > I found that the linked list surface->destroy_listener_list got corrupted
> at some point (it was not circular any more, strange next/prev etc), which
> causes the crash.
> > *solution:*
> > The problem was in wl_list_remove -- when you erase an element, you don't
> mark it as 'erased', by setting prev/next to NULL for example. Then if you
> erase it again the list becomes corrupt. I nullified the prev/next and check
> in the begining of wl_list_remove for not-in-list elements and just ignore
> them. That seems to fix it.
> > Regards,
> > Iskren
> > _______________________________________________
> > wayland-devel mailing list
> > wayland-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/wayland-devel
> Unfortunately your fix only papers over the real problem, which is that the
> list got corrupted at some point. It would not actually solve the problem.
> The source of the corruption needs to be located and fixed; it could be
> removing something twice, inserting something twice, or the like. You could
> push ahead with this if you were interested.
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wayland-devel