[Box Backup] Endian bug in rc2 and trunk...

Ben Summers boxbackup at fluffy.co.uk
Fri Feb 8 12:14:56 GMT 2008


Alex Harper wrote:
> Apparent endian bug in rc2 (also present on trunk). Client  
> (bbackupd) is x86
> OS X client 10.5.1, server (bbstored) is PPC OS X Server 10.5.1.
>
[snip]
> I'm sure this is a trivial fix for 0.11 but it leaves me wondering  
> about
> other lurking endian bugs. Of course, I completely understand Box  
> comes with
> no guarantees and that my setup may be unusual.
>
> Would be it reasonable to force all my clients to run PPC binaries (in
> emulation if necessary)? While I could switch to an x86 server,  
> that would
> just move the problem to the PPC clients. I'm wondering if forcing  
> everyone
> to use network-order natively is a way to avoid pitfalls.


I'm pretty sure this a big introduced after 0.10. I currently run  
0.10 with different byte orderings on the client and the server,  
without difficulties, and for versions up to 0.10 I was developing  
everything across different endianesses. It is a little complicated  
to test though, the tests could be made to handle it more easily.

There was one little endian bug in a previous version, but that was  
fixed and there's code to work around any data which was affected.

Care has been taken to make endian issues automatically taken care  
of, for example, the autogenerated Protocol classes do it for you.  
But perhaps the changes between 0.10 and 0.11 should be reviewed, as  
I think the current developers use a single platform. This does seem  
a bit of a glaring error.

Ben







More information about the Boxbackup mailing list