]> git.pld-linux.org Git - packages/xorg-xserver-Xdmx.git/commitdiff
- applied fix from https://lists.x.org/archives/xorg-devel/2017-June/053919.html master auto/th/xorg-xserver-Xdmx-1.20.13-1
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 3 Nov 2021 20:58:35 +0000 (21:58 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Wed, 3 Nov 2021 21:01:12 +0000 (22:01 +0100)
xorg-xserver-Xdmx-fix.patch [new file with mode: 0644]
xorg-xserver-Xdmx.spec

diff --git a/xorg-xserver-Xdmx-fix.patch b/xorg-xserver-Xdmx-fix.patch
new file mode 100644 (file)
index 0000000..1390b5f
--- /dev/null
@@ -0,0 +1,67 @@
+[PATCH xserver 05/12] glxproxy: Fix __glXActiveScreens allocation
+
+Apparently this has been broken for about ten years, eesh. We were never
+allocating any storage for this array, so the first attempt at using GLX
+with Xdmx would crash the server.
+
+Promote it to an array and use __glXNumActiveScreens to detect whether
+GLX is actually enabled.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34851
+Signed-off-by: Adam Jackson <ajax at redhat.com>
+---
+ hw/dmx/glxProxy/glxscreens.c | 2 +-
+ hw/dmx/glxProxy/glxserver.h  | 2 +-
+ hw/dmx/glxProxy/glxvisuals.c | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c
+index 508e67ed4..8c5f08beb 100644
+--- a/hw/dmx/glxProxy/glxscreens.c
++++ b/hw/dmx/glxProxy/glxscreens.c
+@@ -45,7 +45,7 @@
+ #include "panoramiXsrv.h"
+ #endif
+-__GLXscreenInfo *__glXActiveScreens;
++__GLXscreenInfo __glXActiveScreens[MAXSCREENS];
+ GLint __glXNumActiveScreens;
+ __GLXFBConfig **__glXFBConfigs;
+diff --git a/hw/dmx/glxProxy/glxserver.h b/hw/dmx/glxProxy/glxserver.h
+index 7aa5ad2f2..f708f86ee 100644
+--- a/hw/dmx/glxProxy/glxserver.h
++++ b/hw/dmx/glxProxy/glxserver.h
+@@ -73,7 +73,7 @@ typedef struct __GLXcontextRec *GLXContext;
+ */
+ typedef struct __GLXclientStateRec __GLXclientState;
+-extern __GLXscreenInfo *__glXActiveScreens;
++extern __GLXscreenInfo __glXActiveScreens[MAXSCREENS];
+ extern GLint __glXNumActiveScreens;
+ /************************************************************************/
+diff --git a/hw/dmx/glxProxy/glxvisuals.c b/hw/dmx/glxProxy/glxvisuals.c
+index 3fca04f0d..9bde29afd 100644
+--- a/hw/dmx/glxProxy/glxvisuals.c
++++ b/hw/dmx/glxProxy/glxvisuals.c
+@@ -105,7 +105,7 @@ glxMatchVisualInConfigList(ScreenPtr pScreen, VisualPtr pVisual,
+     int i;
+     /* check that the glx extension has been initialized */
+-    if (!__glXActiveScreens)
++    if (!__glXNumActiveScreens)
+         return 0;
+     pGlxScreen = &__glXActiveScreens[pScreen->myNum];
+@@ -135,7 +135,7 @@ glxMatchVisual(ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatchScreen)
+     VisualID vid;
+     /* check that the glx extension has been initialized */
+-    if (!__glXActiveScreens)
++    if (!__glXNumActiveScreens)
+         return NULL;
+     pGlxScreen2 = &__glXActiveScreens[pMatchScreen->myNum];
+-- 
+2.13.0
index 616bb5c0d47bb56574ad268012efce1c19c73930..7740c3a7c1d5be7b5bcbd7a3db63797723096de6 100644 (file)
@@ -32,6 +32,7 @@ Source0:      https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-%{
 # Source0-md5: 9acb2a51507e6056b09e3d3f19565419
 Patch0:                xorg-xserver-server-builtin-SHA1.patch
 Patch1:                110_nvidia_slowdow_fix.patch
+Patch2:                %{name}-fix.patch
 URL:           https://xorg.freedesktop.org/
 BuildRequires: Mesa-dri-devel >= 7.8.1
 %{?with_dri2:BuildRequires:    Mesa-dri-devel >= 9.2.0}
@@ -134,6 +135,7 @@ Xdmx - rozproszony, wielomonitorowy serwer X.
 %setup -q -n xorg-server-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # xserver uses pixman-1 API/ABI so put that explictly here
 sed -i -e 's#<pixman\.h#<pixman-1/pixman.h#g' ./fb/fb.h ./include/miscstruct.h ./render/picture.h
This page took 0.105477 seconds and 4 git commands to generate.