Problems with MGA when DRI enabled?

Ian Romanick idr at
Thu Sep 8 12:25:42 PDT 2005

Hash: SHA1

Is anyone having problems with the MGA driver on x86 (pure 32-bit) when
DRI is enabled?  Since yesterday I've been hitting a really, *really*
weird segfault in, of all places, xf86GetErrno.  GDB tells me that the
address of errno is out of bounds.  To make things even stranger,
xf86GetErrno executes without error numerous times before the crash.

When I run it in GDB, it dumps out and terminates the program.  Unless I
set a breakpoint in xf86GetErrno, I can't even get a backtrace.  With
the help of some breakpoints, I can always get the same backtrace, *but*
the address for errno changes.  It's almost like the errno symbol

Breakpoint 3, xf86GetErrno () at libc_wrapper.c:1887
1887            switch (errno)
(gdb) bt
#0  xf86GetErrno () at libc_wrapper.c:1887
#1  0x080aab81 in xf86stat (file_name=0x668977 "/dev/dri", xfst=0xbfd74eac)
    at libc_wrapper.c:579
#2  0x00663ed6 in drmOpenDevice (dev=57856, minor=0) at xf86drm.c:296
#3  0x0066413e in drmOpenMinor (minor=0, create=1) at xf86drm.c:359
#4  0x006641c2 in drmAvailable () at xf86drm.c:383
#5  0x001beeee in DRIScreenInit (pScreen=0x95222c8, pDRIInfo=0x9527e18,
    pDRMFD=0x9520814) at dri.c:164
#6  0x001fbf7b in MGADRIScreenInit (pScreen=0x95222c8) at mga_dri.c:1138
#7  0x001d0c9d in MGAScreenInit (scrnIndex=0, pScreen=0x95222c8, argc=1,
    argv=0xbfd752a4) at mga_driver.c:3193
#8  0x080ea496 in AddScreen (pfnInit=0x1d01bb <MGAScreenInit>, argc=1,
    argv=0xbfd752a4) at main.c:781
#9  0x080715ab in InitOutput (pScreenInfo=0x8269800, argc=1,
    at xf86Init.c:936
#10 0x080e9778 in main (argc=1, argv=0xbfd752a4, envp=0xbfd752ac) at
(gdb) print errno
Cannot access memory at address 0x8

In a nutshell, my question is this:  WTF?

I get this problem even with a fresh CVS checkout without a host.def.  I
tried building with DRMSrcDir and MesaSrcDir set to the CVS trees for
those projects.  However, even after setting DRMSrcDir, the server still
used the code from the tree.  I'm not sure if it was the code from
os-support or extras.

Without DRI, everything works fine on both x86 and PowerPC (32-bit).
Version: GnuPG v1.2.6 (GNU/Linux)


More information about the xorg mailing list