[PATCH 1/3] modes: Beware the driver switching root pixmaps

Chris Wilson chris at chris-wilson.co.uk
Tue Sep 14 06:13:39 PDT 2010


Program received signal SIGSEGV, Segmentation fault.
0x080d4a2d in xf86RandR12ScreenSetSize (pScreen=0x8dca3a0, width=800,
    height=600, mmWidth=210, mmHeight=157)
    at ../../../../hw/xfree86/modes/xf86RandR12.c:731
731     ../../../../hw/xfree86/modes/xf86RandR12.c: No such file or directory.
        in ../../../../hw/xfree86/modes/xf86RandR12.c
(gdb) bt full
    height=600, mmWidth=210, mmHeight=157)
    at ../../../../hw/xfree86/modes/xf86RandR12.c:731
        randrp = 0x8dcae68
        pScrn = 0x8dbeb28
        config = <value optimized out>
        pRoot = 0x8e08e30
        pScrnPix = 0xb6d12008
        ret = 1
        c = <value optimized out>
    mmWidth=210, mmHeight=157) at ../../randr/rrscreen.c:185
No locals.
    at ../../randr/rrscreen.c:307
        pWin = 0x8e08e30
        pScreen = 0x8dca3a0
        i = <value optimized out>
        rc = 0
../../randr/randr.c:485

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Julien Cristau <jcristau at debian.org>
Tested-by: Julien Cristau <jcristau at debian.org>
Cc: Keith Packard <keithp at keithp.com>
Reviewed-by: Keith Packard <keithp at keithp.com>
---
 hw/xfree86/modes/xf86RandR12.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 043ceee..c17b5fa 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -686,7 +686,7 @@ xf86RandR12ScreenSetSize (ScreenPtr	pScreen,
     ScrnInfoPtr		pScrn = XF86SCRNINFO(pScreen);
     xf86CrtcConfigPtr	config = XF86_CRTC_CONFIG_PTR(pScrn);
     WindowPtr		pRoot = pScreen->root;
-    PixmapPtr		pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
+    PixmapPtr		pScrnPix;
     Bool		ret = FALSE;
     int                 c;
 
@@ -727,6 +727,7 @@ xf86RandR12ScreenSetSize (ScreenPtr	pScreen,
 	}
     }
 
+    pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
     pScreen->width = pScrnPix->drawable.width = width;
     pScreen->height = pScrnPix->drawable.height = height;
     randrp->mmWidth = pScreen->mmWidth = mmWidth;
-- 
1.7.1



More information about the xorg-devel mailing list