[Vm-dev] Detecting Cog or Byte order

Matthew Fulmer tapplek at gmail.com
Sat Apr 16 21:34:59 UTC 2011


I discovered a bug in cobalt today due to the float-endianness
of ImageSegments made in cog vs interpreter:

http://croquet-src-01.oit.duke.edu/mantis/view.php?id=503

Is there a way to detect the platform endianness, so we can, in
the future, add metadata about that to ImageSegments, and then
byte-swap them if needed?

Failing that, I guess we could add a constant float to the image
segment, and test whether it unpacks as byte-swapped or not

-------------------

Since cobalt mantis doesn't allow anonymous viewers (grr), here
is the text of the issue:

Summary  0000503: Cannot connect an Interpreter VM with a Cog VM
due to float endianness
Description  A Cog VM sends image segments with a byte-swapped
floating-point numbers compared to the Interpreter VM. When
unpacking a sync from a cog vm on an interpreter VM, this
usually results in a "Past message encountered" error

-- 
Matthew Fulmer (a.k.a. Tapple)


More information about the Vm-dev mailing list