| Message ID | 20170616194452.13210-6-ajax@redhat.com |
|---|---|
| State | New |
| Headers | show |
| Series |
"Miscellaneous cleanups"
( rev:
2
1
)
in
X.org (DEPRECATED - USE GITLAB) |
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];
Adam Jackson <ajax@redhat.com> writes: > 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. Seems like you'll need to re-initialize this on server regen?
On Fri, 2017-06-16 at 13:26 -0700, Keith Packard wrote: > Adam Jackson <ajax@redhat.com> writes: > > > 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. > > Seems like you'll need to re-initialize this on server regen? True enough. I'll respin this one in the next patch bomb. I've merged the rest, thanks! remote: I: patch #162148 updated using rev 88e807d4fa90165868929190f601beef18252f57. remote: I: patch #162149 updated using rev f44e0af4daaad5b18d79f2076bc98d6e79f638af. remote: I: patch #162151 updated using rev b723da8390d2fe1bf048247302416b37972a0cc3. remote: I: patch #162150 updated using rev fbc4da6fef2a0d2111284a19c26d83686ebcbd1f. remote: I: patch #162152 updated using rev 17ad6e5d5616039021455bc821d6ee2497f7ebde. remote: I: patch #162153 updated using rev d6db66811643d3762716f6b144a7358572216a4f. remote: I: patch #162154 updated using rev c33541e59e338cd53f89d94a6898555d350e84aa. remote: I: patch #162157 updated using rev 0b1831d043028f7dd6accca19a81e2abd9a145b5. remote: I: patch #162159 updated using rev a6c23ef31a4e5aea19ddabdf4a0760f4c48f1ebe. remote: I: patch #162158 updated using rev ecc5e362985d1f649c29ac5f93be19851eaf7d87. remote: I: patch #162155 updated using rev 525db17e04d5cabaeefd20e38cebe7d606047a76. remote: I: 11 patch(es) updated to state Accepted. To ssh://git.freedesktop.org/git/xorg/xserver d2e57f71a..525db17e0 master -> master - ajax
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@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(-)