Xorg segmentation fault when drawing PolyArcs (under kicad)

Renato Caldas seventhguardian at gmail.com
Mon Oct 12 12:12:26 PDT 2009


Hello,

First of all, I'm not subscribed to this list, so please include my
e-mail in the CC.

When using (trying to use...), kicad I managed to get consistent Xorg
segmentation faults. I've filed a bug report on fedora's bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=528475. There I've
included a very basic test case that works all the time. In the
meantime, I've also got my hands dirty, and tried to debug Xorg using
gdb.

The symptom is that the function fbBltOne is called with src=0x0, so
Xorg segfaults as soon as it tries to use src (in LoadBits; at
fb/fbbltone.c:292).

I've traced its value back to fbPushPixels, where it is created and
fed to the function chain, in the macro fbGetStipDrawable (defined at
fb/fb.h:720).

Here pDrawable->type seems to be DRAWABLE_PIXMAP, so _pPix is simply
cast from pDrawable. Then the _pPix -> devPrivate.ptr is used as
"src", after a couple of castings and copying around.

Now comes the weirdness:

(gdb) list
239
240       fbGetStipDrawable (&pBitmap->drawable, stip, stipStride,
stipBpp, stipXoff, stipYoff);
241
242           fbPushImage (pDrawable, pGC,
243                                    stip, stipStride, 0,
244                                                       xOrg, yOrg, dx, dy);
245                                                       }
(gdb) next
240       fbGetStipDrawable (&pBitmap->drawable, stip, stipStride,
stipBpp, stipXoff, stipYoff);
(gdb) print pBitmap->drawable
$6 = {type = 1 '\001', class = 0 '\000', depth = 1 '\001',
bitsPerPixel = 1 '\001', id = 0, x = 0, y = 0, width = 294, height =
294, pScreen = 0x170a250, serialNumber = 13348}
(gdb) print _pPix
$7 = <value optimized out>
(gdb) print _pPix->devPrivate
Cannot access memory at address 0x30

It may be that I'm a rookie at gdb.. Can somebody help me debugging
this further?

Cheers,
  Renato Caldas


More information about the xorg-devel mailing list