[Xcb] xcb-sync, invalid parsing of LISTofSYSTEMCOUNTER
Benoit Gschwind
gschwind at gnu-log.net
Fri Apr 7 09:33:11 UTC 2017
Hello,
While I tried to use the xcb-sync (1.12) I found I issue while getting
the list of system counter. It seems to be an error due to incorrect
parsing of the content of the reply message of
xcb_sync_list_system_counters request.
The cause is that the padding does not apply between items headers and
the following name, but after the item header and the following name.
libxcb do the former.
If I am correct, libxcb expect something like:
counter : 4 bytes
resolution: 8 bytes
name_len : 2 bytes
[padding]: 2 bytes
name: *name_len* bytes
[padding] : N bytes to pad to 4 bytes bound.
while the correct layout is:
counter : 4 bytes
resolution: 8 bytes
name_len : 2 bytes
name: *name_len* bytes
[padding] : N bytes to pad to 4 bytes bound.
I attached a dirty but correct way to parse the list of system counter.
I do not known how to fix sync.xml and c_client.py to get the proper
behavior.
best regards.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_xsync.c
Type: text/x-csrc
Size: 3291 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/xcb/attachments/20170407/e3574c9f/attachment.c>
More information about the Xcb
mailing list