<div dir="ltr"><div>Reading the ancient discussion on this, I think Peter Harris had the right of it. It would probably be good to treat all protocol description structs as packed, and add explicit pad fields in the protocol description to match the protocol spec. It looks like modern C compilers support __attribute__((__packed__)) structs pretty well? I'm not sure how much of the protocol description would have to be touched, though. Is it just the stuff in Uli Shlacter's excellent list?<br><br></div><div>The easy thing, of course, would be to just take Daniel Martin's fix to add a packed attribute to protocol descriptions (assuming it works): <a href="https://lists.freedesktop.org/archives/xcb/2012-December/008032.html">https://lists.freedesktop.org/archives/xcb/2012-December/008032.html</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 7, 2025 at 9:05 AM Alan Coopersmith <<a href="mailto:alan.coopersmith@oracle.com" target="_blank">alan.coopersmith@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2/7/25 07:40, Uli Schlachter wrote:<br>
> Hi,<br>
> <br>
> Am 06.02.25 um 21:15 schrieb Alan Coopersmith:<br>
>> On 2/4/25 09:46, Daniel Neugebauer wrote:<br>
>>> It would be great if someone could confirm the issue. See [3] for a test <br>
>>> implementation incl. a local workaround. Is there anything I'm doing wrong on <br>
>>> my end?<br>
> <br>
> I can confirm the issue and I can add that it is known:<br>
> <br>
> <a href="https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/36" rel="noreferrer" target="_blank">https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/36</a><br>
> <a href="https://bugs.freedesktop.org/show_bug.cgi?id=23403" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=23403</a><br>
<br>
Ah right, I had clearly forgotten all about this in the past 13 years.<br>
<br>
>> So while I can confirm, I don't know how to fix it.<br>
> <br>
> Alan from the past also has a test case for reproducing this. See bugs.fdo link <br>
> above. :-)<br>
<br>
Heh, and now that I've been reminded, I found that old test case, so now have<br>
two!  If only Alan from the past had actually come up with a real fix...<br>
<br>
-- <br>
         -Alan Coopersmith-                 <a href="mailto:alan.coopersmith@oracle.com" target="_blank">alan.coopersmith@oracle.com</a><br>
          Oracle Solaris Engineering - <a href="https://blogs.oracle.com/solaris" rel="noreferrer" target="_blank">https://blogs.oracle.com/solaris</a><br>
</blockquote></div>