fixed bug in wl_list
Iskren Chernev
iskren.chernev at gmail.com
Fri Mar 11 16:32:52 PST 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20110312/54eb2a5d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fixed-bug-in-wl_list.patch
Type: text/x-patch
Size: 762 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20110312/54eb2a5d/attachment.bin>
More information about the wayland-devel
mailing list