3 ms·
I remember a discussion on the Linux Kernel Mailing list regarding memory corruption on the ia64 architecture[1] because of a strange way GCC handled bit-fields
by joshumax 8y ago
I remember a discussion on the Linux Kernel Mailing list regarding memory corruption on the ia64 architecture[1] because of a strange way GCC handled bit-fields. While oftentimes packed bit-fields are a decent way of representing/serializing data for memory-constrained devices or even network applications, it's always a good reminder how they can wreak havoc for scenarios where portability is important.
1: https://lwn.net/Articles/478657/ https://lwn.net/Articles/478657/
- pritambaral 8y agoWasn't that bug triggered in the case of adjacent non-bitfield 32-bit fields too?