[Wayland-bugs] [Bug 100878] SIGSEGV on desktop-shell focus change

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Apr 30 13:48:24 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=100878

Daniel Stone <daniel at fooishbar.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|SIGSEGV on wl_list_insert   |SIGSEGV on desktop-shell
                   |                            |focus change

--- Comment #2 from Daniel Stone <daniel at fooishbar.org> ---
The clue, however, is in the names of the parameters to the functions. For
instance, you do:
    struct wl_list list;
    struct {
        int something;
        struct wl_list link;
    } foo;

    wl_list_init(&list);
    wl_list_insert(&list, &foo->link);
    wl_list_remove(&foo->link);

At this point, foo has been removed from list (making its link member
dangling), but the overall list itself is still valid. Trying to remove a list
from itself does not make any real sense; instead, you remove an element from
that list.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20170430/f1e39282/attachment.html>


More information about the wayland-bugs mailing list