[Bug 49198] glxinfo SIGSEGV in pthread_detach under radeon_drm_cs_destroy under dri2_destroy_context

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 22 03:26:10 PDT 2012


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

m.b.lankhorst at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #4 from m.b.lankhorst at gmail.com 2012-05-22 03:26:10 PDT ---
Woops, looks like I just did overkill.

pthread_detach is not needed after a pthread_join, so just remove the
pipe_thread_destroy call.

I was probably looking at win32 too much at the time, where a thread handle has
to be closed after you wait for the thread to terminate.

I posted the patch to mesa-dev, but in any case shouldn't libpthread be at
least handling this slightly more gracefully than a crash?

diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
index 2239059..168f455 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -469,7 +469,6 @@ static void radeon_drm_cs_destroy(struct radeon_winsys_cs
*rcs)
         pipe_semaphore_signal(&cs->flush_queued);
         pipe_semaphore_wait(&cs->flush_completed);
         pipe_thread_wait(cs->thread);
-        pipe_thread_destroy(cs->thread);
     }
     pipe_semaphore_destroy(&cs->flush_queued);
     pipe_semaphore_destroy(&cs->flush_completed);

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the dri-devel mailing list