[PATCH] fix KJS crash on some more strict platforms
Thiago Macieira
thiago.macieira at kdemail.net
Fri Dec 19 02:59:12 GMT 2003
Helge Deller wrote:
>This code is at least not very portable.
>At the first glance it should work, _as_ _long_ as you ensure
>that "Data" is align on a 8 byte (because of P64Bit) boundary.
>Right now it's aligned anywhere, where the compiler puts it.
If you want to force the compiler to disrespect alignment and be able to read
from any boundary, use bitfields and packed (__attribute__((packed)) )
structures.
I don't know what the size limit is in a bitfield. __attribute__ is, of
course, a GCC extension.
--
Thiago Macieira - Registered Linux user #65028
thiagom (AT) mail (dot) com
ICQ UIN: 1967141 PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031219/25e83a6c/attachment.sig>
More information about the kde-core-devel
mailing list