[Mesa-dev] [Bug 89562] glXSwapIntervalMESA crashes when making use of GLX_MESA_multithread_makecurrent

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Mar 12 09:38:37 PDT 2015


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

            Bug ID: 89562
           Summary: glXSwapIntervalMESA crashes when making use of
                    GLX_MESA_multithread_makecurrent
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: GLX
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: jlegg at feralinteractive.com
        QA Contact: mesa-dev at lists.freedesktop.org

Created attachment 114264
  --> https://bugs.freedesktop.org/attachment.cgi?id=114264&action=edit
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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150312/fecb5064/attachment.html>


More information about the mesa-dev mailing list