XAllocID issues -- returns 0, calls geteuid, looks strange

Younes Manton younes.m at gmail.com
Sun Aug 2 08:06:08 PDT 2009


On Sun, Aug 2, 2009 at 4:12 AM, Tilman Sauerbeck<tilman at code-monkey.de> wrote:
> Younes Manton [2009-08-01 20:54]:
>> I'm having with some issues with XAllocID from libX11 1.1.5. In
>> certain cases it returns 0, which seems very odd when I look at the
>> source in XlibInt.c. Then I objdump libX11.so and I get this, which
>> looks like a completely different function to me:
>> [...]
>
> The one in XlibInt.c is only used #if !USE_XCB. xcb_io.c provides a
> version of _XAllocID that's used instead if you have XCB.

Ah thanks, besides that mysterious geteuid call this version looks
like it corresponds to the version in xcb_io.c. But I'm still not sure
why I'm getting back 0 on the 2nd call. I see that next_xid is set to
0 after the first call and _XIDHandler doesn't look it it's ever
called to get a new id, and yet in a little test of calling XAllocID
in a loop I don't hit 0 for millions of calls.


More information about the xorg-devel mailing list