>I wrote an application on Ultra-10 machine and when I run it on Ultra5
>machine , the application
>is crashing on bus error ( Invalid address alignment ) although on
>Ultra10 it's running good !!!.
>My questions:
> - Why my application crashing on bus error on the Ultra5 platform and
>not on the ultra10 platform ?
Because the processor in the ultra10 is pickier (either by
nature or by start-up configuration) than that in the ultra5
about data alignments. Or the libraries on the two machines
are different and you just lucked out that your data is properly
aligned on the ulltra5.
Quote:> - Is the bus of Ultra5 different than the Ultra10 bus ?
Not relevant to the problem. While the error being thrown
is a generic "bus error", the real problem is an unaligned
memory access, which can be considered to be an application
software error.
Quote:> - Is there's a way to fix bus problems so my application would run on
>both machines ?
Make the application be pessimistic about memory alignment
issues --- don't assume that any basic type (various sizes
of integers, floats, doubles) can be accessed at a memory
address which is not a multiple of its size. For a specific
example: don't try to access a 32-bit integer whose address
is not a multiple of 4 (i.e., low-order two bits are not
both 0).
--Ken Pizzini