[Vm-dev] Unix VM closure enabled?
David T. Lewis
lewis at mail.msen.com
Mon Jul 20 17:02:27 UTC 2009
On Sat, Jul 18, 2009 at 05:25:48PM +0200, Andrew Gaylard wrote:
> The main issue that I'm facing at the moment is that gcc-4.4.0 generates
> code that causes unaligned accesses in fetchFloatAtinto; the same code
> works in gcc-4.2.4 on SPARC. Until I or someone else (hint!) fixes this,
> I'm continuing to build with gcc-4.2.4.
fetchFloatAtInto() is implemented in platforms/Cross/vm/sqMemoryAccess.h
in the form of cpp macros. It might be tricky to debug this, but I note
that the implementation depends on DOUBLE_WORD_ALIGNMENT, which is a macro
that would have been set when you run configure. You might playing with
this setting to see if it gives you the results you want. For example, as
a complete SWAG, it might be the case that SPARC plus gcc-4.2.4 needs this
macro defined but for some reason configure is not setting it for you.
In any case, it would be good if you could open a Mantis issue on this
so we don't forget about the issue.
> But it does concern me that the VM
> code shows bugs like this from time to time. I suspect that some problems
> remain hidden due to the fact that most users are using x86 (on whatever OS),
> so alignment, long pointers, and endianness bugs are never encountered.
There are lots of bugs like this, and many of them are being flushed out
simply because x86_64 is becoming a very common platform these days. The
good news is that most bugs of this nature are quite obvious (usually a
vm crash), so we typically don't get intermittent symptoms.
> So building and testing the VM on a platform like SPARC which enforces
> alignment strictly, where pointers are/can be 64-bits, and which is big-endian,
> will benefit the VM code.
More information about the Vm-dev