Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201708 - x11-base/xorg-server-1.4-r2 crashes when Xinerama is enabled w/ x11-drivers/xf86-video-i810-2.x
Summary: x11-base/xorg-server-1.4-r2 crashes when Xinerama is enabled w/ x11-drivers/x...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-08 19:02 UTC by Thomas Bellman
Modified: 2007-12-10 05:20 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Bellman 2007-12-08 19:02:48 UTC
When the "Xinerama" option is enabled in the "ServerFlags"
section in xorg.conf, and using the new intel video driver
(ebuild x11-drivers/xf86-video-i810 version 2.x), the Xorg
server crashes with a segmentation violation when derefencing
a NULL pointer.

The backtrace:

(gdb) bt
#0  0x081ad018 in RRCrtcSetRotations (crtc=0x0, rotations=63) at rrcrtc.c:108
#1  0x08121456 in xf86RandR12SetRotations (pScreen=0x8291118, rotations=63)
    at xf86RandR12.c:535
#2  0x08119a46 in xf86CrtcScreenInit (screen=0x8291118) at xf86Crtc.c:680
#3  0xb7b6cb23 in I830ScreenInit (scrnIndex=0, pScreen=0x8291118, argc=1, 
    argv=0xbfa6c6b4) at i830_driver.c:2916
#4  0x0807524e in AddScreen (pfnInit=0xb7b6b365 <I830ScreenInit>, argc=1, 
    argv=0xbfa6c6b4) at main.c:769
#5  0x080bdb47 in InitOutput (pScreenInfo=0x8271c60, argc=1, argv=0xbfa6c6b4)
    at xf86Init.c:840
#6  0x080744a7 in main (argc=1, argv=0xbfa6c6b4, envp=0xbfa6c6bc) at main.c:369

xf86CrtcScreenInit() calls xf86RandR12Init() to perform some
initializations, among them setting the randr_crtc member of the
Crtc structures for the screen.  It then continues with calling
xf86RandR12SetRotations().  xf86RandR12SetRotations() assumes that
the randr_crtc members have been properly initialized.  However,
the very first thing that xf86RandR12Init() does, is to check if
Xinerama is enabled, and if so skips all the RandR initialization.
Since RandR hasn't been properly initialized, RRCrtcSetRotations()
will get a null pointer, and crash.

Note that the bug is in the xorg-server package, but it isn't
triggered by the old i810 video driver, just by the new intel
driver.  I haven't checked to see if it is trigged by any other
video driver.


Now, I don't know if Xinerama is considered silly to use today.  I
enabled it the previous autumn when making an attempt at getting
my laptop to do dual-head.  At that time, only the old i810 driver
existed, and with that the Xinerama option didn't seem to make any
harm, so I left it in, even though I didn't get dual-head to work,
and forgot about it.  When I later upgraded to the newer intel
driver (version 2.x), the X server crashed when starting.  Since I
didn't have the time to debug it then, I just reverted back to
1.7.4.  Anyway, I may be a fool for enabling Xinerama, but it
would be nice to at least have a slightly more user-friendly error
message than a segmentation fault for it. :-)
Comment 1 Donnie Berkholz (RETIRED) gentoo-dev 2007-12-10 05:20:11 UTC
Please search for your issue at bugs.freedesktop.org in the xorg product, and file an upstream bug if you do not find one already open. If you can post the upstream bug URL here, other people can track it. Once it's fixed upstream, we can add a patch if you reopen this bug.