Bug 8521 - AllocAndFetchScreenConfigs unlocks twice
Summary: AllocAndFetchScreenConfigs unlocks twice
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: git
Hardware: All All
: high normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-05 17:27 UTC by Jamey Sharp
Modified: 2009-08-24 12:24 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Jamey Sharp 2006-10-05 17:27:02 UTC
AllocAndFetchScreenConfigs always calls UnlockDisplay twice without an
intervening LockDisplay. We found this because XCB asserts that you can't unlock
the display if you don't have it locked.

While fixing this we noticed that SyncHandle isn't consistently called after
UnlockDisplay in this function.

--- glxext.c    26 Sep 2006 23:56:20 -0000      1.25
+++ glxext.c    6 Oct 2006 00:17:39 -0000
@@ -1016,11 +1016,11 @@ static Bool AllocAndFetchScreenConfigs(D
        if (!_XReply(dpy, (xReply*) &reply, 0, False)) {
            /* Something is busted. Punt. */
            UnlockDisplay(dpy);
+           SyncHandle();
            FreeScreenConfigs(priv);
            return GL_FALSE;
        }
 
-       UnlockDisplay(dpy);
        if (!reply.numVisuals) {
            /* This screen does not support GL rendering */
            UnlockDisplay(dpy);
Comment 1 Brian Paul 2006-10-09 07:57:58 UTC
Fixed in CVS.
Comment 2 Adam Jackson 2009-08-24 12:24:33 UTC
Mass version move, cvs -> git


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.