unaligned data access - Ultrix 3.0 (RISC)

David Barrett dbb at riscy.dec.com
Fri Jul 21 06:31:47 AEST 1989



> OK, this is a new to me.  Have been moving a variety of programs from an
> Ultrix 2.3 environment on a VS2000 (using X11.3) to a DS3100 and Ultrix
> 3.0 (and a mix of DECWindows and X 11.3) and I am coming up with the
> following error messages when certain programs (which compile and
> otherwise run flawlessly):
> 
> "Fixed up unaligned data access for pid XXXXXXX (proc_name) at pc 0xNNNNNN"

On VAXen, short words or longs can be accessed on any byte boundary, however,
on RISC systems references must be "naturally aligned".  Short words (2 bytes) must
be on an even byte boundary, while long words must be accessed on a boundary evenly
divisible by 4.

Unaligned accesses in programs cause a trap into the kernal, which attempts to "fixup"
the unaligned access.  If the system is able to perform the fixup, the above "fixed up"
message is printed to stdout.  If the system is unable to fixup the unaligned access, the 
process will be terminated with a SIGBUS (bus error) signal.

This process has a definite performance impact, so performing the alignment in your code
is recommended.

----------------------------------
David Barrett			         UUCP:    ...!decwrl!riscy.dec.com!dbb
Digital Equipment Corporation
New York ULTRIX Resource Center          INET:    dbb%riscy.dec at decwrl.dec.com



More information about the Comp.unix.ultrix mailing list