[Xcb] A couple of valgrind complaints

Jamey Sharp jamey at minilop.net
Fri Jul 22 15:44:54 EST 2005

On Thu, 2005-07-14 at 11:06 -0700, Carl Worth wrote:
> Here's a tiny program that generates a couple of complaints from
> valgrind.

Thanks Carl! (I'm sitting right next to you but I guess I might as well
record my appreciation for posterity.)

> The first is some uninitialized data being written out during
> XCBConnect[1]. I'm guessing this might be uninitialized padding bytes?

Yeah, that seems right. In-person conversations we've had here in Ottawa
have convinced me that we may as well clear all the padding bytes. (/me
waits for JG's cheering to settle down. *grin*)

I have a two-line uncommitted patch I just wrote that zeroes the
connection-setup padding bytes, which fixes one of two such errors that
valgrind reports on your test program. Fixing the other requires
changing XCB's code generator, which should fix all other such problems
but which I don't really feel like touching just now.

> The second complaint is a memory leak[2], (or I botched this little
> program somehow).

Eh-heh. I believe I've fixed that in CVS now.

Thanks for the bug reports and nice test case. :-)


More information about the xcb mailing list