lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #50097] Disabling struct packing should be official


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #50097] Disabling struct packing should be official
Date: Wed, 25 Jan 2017 19:37:26 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Follow-up Comment #3, bug #50097 (project lwip):

Struct size is not really the problem: most of the structs are OK without
packing. We use "packed" as "unaligned" rather. And in fact, the code bloat
you saw comes from "unaligned", too. I'm not so concerned about struct layout
but about getting aligned pointers.

Being like that, we wouldn't have to check PBUF_LINK_HLEN is correct but we'd
rather need to check every pointer of such a now-not-packed struct for correct
alignment (to catch errors of wrong alignment in the future, as often a
processor will not halt on wrong alignment but just read/write garbage).

If someone presents a decent patch checking these pointers (and there might be
quite a few), I'm OK with making this officially supported. Otherwise, it
might just work for the version you tested but might not for any future
version (as noone continuously tests it).

And again, I *do* think it would be great if this was officially supported!

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?50097>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]