tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: chu () musp0 ! Jpl ! Nasa ! Gov (Eugene Chu)
To: tru64-unix-managers
Subject: Answer:  Unaligned access messages
Date: Mon, 03 Apr 1995 14:54:26 +0000	[thread overview]
Message-ID: <96075319106351.tru64-unix-managers.marc@archive.invalid> (raw)

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@cisk.atmos.Ucla.EDU) for his suggestions.

eyc

                 reply	other threads:[~1995-04-03 14:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox