I'm currently working on a [small, personal] project whose goal is to
keep everything as small as possible, and to this effect I recently
switched from using Xlib to XCB as the interface library I was using.
Some reading and experimentation later, I pasted in a basic XCB
program to get an idea of how to port the current codebase I had from
Xlib to XCB. And it segfaulted.

At first I thought it was a line that compared a variable like "var &
~0x80", but that proved incorrect. The issue seems a fair bit more
sinister, sadly. It seems that two specific function calls (on lines
82 and 85) cause segmentation faults, and everything else works
fine... except for a free() (on line 105), which reports invalid
pointers.

If these lines are commented out, the program will run.

The code example that fails can be found at
http://xcb.freedesktop.org/tutorial/basicwindowsanddrawing/.

NOTE:
If you don't already have XCB or the Xlib/XCB library installed, you
can obtain releases of XCB at http://xcb.freedesktop.org/dist/, and
instructions for building the XCB library are over at
http://xcb.freedesktop.org/DevelopersGuide/, but beware, you need a
fair bit installed to do the latter.


_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to