[M3devel] [Fwd: Re: <*LAZYALIGN*>]
Rodney M. Bates
rodney.bates at wichita.edu
Fri Feb 22 23:01:16 CET 2008
But pickles are working below the type safety of the language, copying
bits around. True, pickles will only build an object in the reading
program with the same type it had in the writing program. But the
layout of fields can be different, even with the same type, for example,
due to integer size, or as you say, endianness. Pickles has to be able
to reconstruct the bit layout of a type both as it was on the writing
machine and as it is on the reading machine.
If anything LAZYALIGN is written to a pickle, then it's already broken,
because pickles will have the wrong idea about where the bits of the
fields are located and will garble bits. Pickles always recomputes
bit layouts as the compiler would for STRICTALIGN.
Which means, if you never pickle anything that is LAZYALIGN, you won't
invoke this brokenness. And it sounds like nobody is doing that, so
it's not broken for current uses.
Darko wrote:
> I don't think breaking pickles is at issue at all since the alignment
> issues don't change the meaning of a type, only its layout in memory on
> a particular platform, akin to endian issues.
>
>--
-------------------------------------------------------------
Rodney M. Bates, retired assistant professor
Dept. of Computer Science, Wichita State University
Wichita, KS 67260-0083
316-978-3922
rodney.bates at wichita.edu
More information about the M3devel
mailing list