[Wayland-bugs] [Bug 87824] Dangling pointers and memory corruption after output recreate.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Dec 29 02:33:49 PST 2014


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

            Bug ID: 87824
           Summary: Dangling pointers and memory corruption after output
                    recreate.
           Product: Wayland
           Version: unspecified
          Hardware: All
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: weston
          Assignee: wayland-bugs at lists.freedesktop.org
          Reporter: andriy.prystupa at globallogic.com

Way to reproduce:
- weston backend closes current output and creates new one.
- old weston_output structure is released. 
- compositor views have pointers to old weston_output.
- these pointers became dangling.

Fix:
in weston_compositor_remove_output(...) add resetting reference to output:
wl_list_for_each(view, &compositor->view_list, link) {
      if (view->output == remove_output) {
           view->output = NULL;
           view->surface->output = NULL;
      }
}

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


More information about the wayland-bugs mailing list