<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 - glXSwapIntervalMESA crashes when making use of GLX_MESA_multithread_makecurrent"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=89562">89562</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>glXSwapIntervalMESA crashes when making use of GLX_MESA_multithread_makecurrent
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </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>GLX
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jlegg@feralinteractive.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=114264" name="attach_114264" title="test case">attachment 114264</a> <a href="attachment.cgi?id=114264&action=edit" title="test case">[details]</a></span>
test case

If two threads have the same current glX context, as permitted by
GLX_MESA_multithread_makecurrent, then calling glXSwapIntervalMESA results in
invoking dri2SetSwapInterval with the pdraw argument set to NULL.
dri2SetSwapInterval then dereferences pdraw, causing a segmentation fault. The
attached program reproduces this.

You can also reproduce the same crash by letting a thread exit with a context
bound and then making the context current on another thread and calling
glXSwapIntervalMESA there (this seems a bit dirty, but if there is no
requirement to unbind GL contexts before exiting threads, then this method
doesn't require GLX_MESA_multithread_makecurrent). If you add -DTEST2 to the
compiler flags when compiling the attached file, this crash will be reproduced
instead.

This affects at least Mesa 10.4.3, 10.5, and git master at revision
48b0a3c1c9d829a9b1d401afb2796b35df94a5d7.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>