Hi All,
I found the answer to my original question about unaligned accesses
generated by a program ported from SunOS to OSF/1. It seems that this
program has had other problems in the past, where someone was generating
a file with binary data contained in a structure, and the file was not
being properly read by another program. This original problem was traced
to how the c compiler was generating extra bytes in a structure to pad
data elements to a "natural" boundary in the first program, and not
properly interpreted by the second. A temporary solution was gained by
using the -ZpX compiler flag, which forced out all the extra padding
bytes. This help cause the second problem on the third program, which
was unaligned accesses on double precission floating point numbers; they
all ended up on non 8 byte boundaries. Of course, now that I think I
understand the nature of byte alignments and such, I think the real
solution is to fix the second program, which was not properly reading
the files generated by the first program, and remove -ZpX from all of
them.
Thanks to Fabrice Cuq (fabrice_at_cisk.atmos.Ucla.EDU) for his suggestions.
eyc
Received on Mon Apr 03 1995 - 10:52:37 NZST