[PATCH] xfree86: don't set up RandR12 screen resources not initialized. (#24627)

Peter Hutterer peter.hutterer at who-t.net
Tue Dec 8 15:45:39 PST 2009


Xorg +xinerama crashes immediately due to whacky dependency between Xinerama
and RandR12. The latter doesn't initialize if Xinerama is enabled, but if
only one screen is found, Xinerama is disabled again and RandR12 tries to
access data it never initialized.

Dependency chain is:
- ProcessCommandLine sets noPanoramiXExtension to FALSE
- xf86RandR12Init() is a noop
- PanoramiXExtensionInit sets noPanoramiXExtension to TRUE
- xf86RandR12CreateScreenResources tries to use the devPrivates key it never
  initialized.

If we didn't initialize RandR12, don't try to set anything up either.

X.Org Bug 24627 <http://bugs.freedesktop.org/show_bug.cgi?id=24627>

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 hw/xfree86/modes/xf86RandR12.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 6ea9d26..1a4f2bd 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -765,7 +765,7 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
     int			mmWidth, mmHeight;
 #ifdef PANORAMIX
     /* XXX disable RandR when using Xinerama */
-    if (!noPanoramiXExtension)
+    if (!noPanoramiXExtension || !xf86RandR12Key)
 	return TRUE;
 #endif
 
-- 
1.6.5.2



More information about the xorg-devel mailing list