[M3devel] <*LAZYALIGN*>
Rodney M. Bates
rodney.bates at wichita.edu
Sun Feb 17 19:04:44 CET 2008
Well, in the case of pickles, there is not currently any known
bit pattern to look for. Everything is either user's data, which
must be allowed to be arbitrary, or pickle protocol stuff, which
is already written in target-independent ways, so it wouldn't reveal
anything.
Adding a record of carefully designed, known type and content to the
pickle header would work for general machine characteristics, but
it's easier just to add a field to RTPacking values, which are
binary-encoded in 32 bits in the existing header, with bits to spare.
Similarly, for lazy aligned objects (where each type can be different),
it's easiest just to add a bit type descriptions, which are also binary
encoded.
Mika Nystrom wrote:
> Hi Rodney,
>
> I am not sure if I am reading your email entirely correctly, but I
> think so... you're trying to figure out things like offsets so the
> Pickle runtime can re-build arbitrary data structures.
>
> When we were doing some concurrent programming in my group about ten
> years ago, we were using a user-level threading system (very similar
> but not identical to the old user-level threads in M3) and we needed
> to figure out the location of the stack pointer in a C jmp_buf.
>
> We just wrote a program to do it...
>
> Could you do that? Write some arbitrary data whose bit pattern
> you know to a field, cast it to char * (or some such), and search
> for the bit pattern? Do it over and over with random data, and there
> you go...
>
> Mika
>
--
-------------------------------------------------------------
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