libGL bug in your source tree?

"leon zadorin" <[email protected]>
Newsgroups gmane.comp.xfree86.devel
Message-ID <[email protected]>
Hi, I am thinking that there may be a bug in libGL in your XFree project...

In xc/lib/GL/glx/glxext.c, AllocAndFetchScreenConfigs:

line 979 locks the display: LockDisplay(dpy);
then line 1013 unlocks the display once: UnlockDisplay(dpy);
... but the code which follows line 1013 (e.g. any of the lines: 1016,
1028, 1038, 1083) will result in double unlocking (i.e. unlocking the
already unlocked display which on some systems such as
NetBSD-current's macppc port raises the "unlocking already unlocked
mutex" error and the process is killed).

My suggestion is to take out line 979.
The following (albeit from Mesa) file in OpenBSD repository appears to
have it solved:
http://www.openbsd.org/cgi-bin/cvsweb/xenocara/dist/Mesa/src/glx/x11/glxext.c?rev=1.2&content-type=text/x-cvsweb-markup

Am sorry if I am mistaken in thinking that it is a bug in XFree's
libGL, if so, however - can anyone explain why line 979 (and
subsequent double unlocking of the display) is actually needed in the
first place?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.