<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Dangling pointers and memory corruption after output recreate."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=87824">87824</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Dangling pointers and memory corruption after output recreate.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Wayland
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>weston
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>wayland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>andriy.prystupa@globallogic.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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;
      }
}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>