[Mesa-dev] [Bug 98172] Concurrent call to glClientWaitSync results in segfault in one of the waiters.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Oct 19 18:47:07 UTC 2016


--- Comment #36 from Suzuki, Shinji <shinji.suzuki at gmail.com> ---
Michel-san, thank you for elaboration. Maybe this discussion continues because
I have failed to express my question clearly. What I'm wondering is that if the
following section needs to be protected by ctx->Shared->Mutex or not.

   screen->fence_reference(screen, &fence, so->fence);
   if(!fence) {
      /* If the so->fence has been reset to NULL, the fence have been reached   
         but so->b.StatusFlag may not be set to GL_TRUE yet. Since the caller   
         may check on the value of the flag as soon as the control returns,     
         do the same too although redundant.                                    
      so->b.StatusFlag = GL_TRUE;
      goto quit;

I completely agree that locking is needed in the following section marked with
(so->b.StatusFlag = GL_TRUE can be moved out of the block though.)

    if (screen->fence_finish(screen, fence, 0)) {
!      mtx_lock(&ctx->Shared->Mutex);                                           
!      screen->fence_reference(screen, &so->fence, NULL);                       
!      so->b.StatusFlag = GL_TRUE;                                              
!      mtx_unlock(&ctx->Shared->Mutex);                                         

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: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161019/7a4393d3/attachment.html>

More information about the mesa-dev mailing list