[Vm-dev] VM overwrites extraVmMemory value with junk on 64 bit image

David T. Lewis lewis at mail.msen.com
Sat Jan 16 20:30:58 UTC 2010


John, this may be of some concern if your new VMs are making use
of the #extraVmMemory setting.

  http://bugs.squeak.org/view.php?id=7455

A 64 bit image (wordSize 8) is currently using a 128 byte image file header,
with all the integer values in the header stored as 8 bit ints. The VM
is writing the image data at position 64 rather than 128, resulting the
value of extraVmMemory being overwritten with garbage. ImageTracer64
produces the correct 128 byte offset, but this is undone by the VM after
the first image save.

This is producing no obvious symptoms when running on a unix VM, but is
certainly not a good thing.

Short term fix should be to make the VM use headerSize 128 rather than 64
when writing a 64 bit image. IMO the correct thing to do long term is to
always write header data as 32 bit int regardless of image wordSize, and
use 64 bit file headers in both cases. This however will require some way
to retain backward compatibility for reading 64 bit images that have the
current file header structure.

Dave



More information about the Vm-dev mailing list