Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!decuac!winsrf.dec.com!chris From: chris@winsrf.dec.com (Chris Cordrey) Newsgroups: comp.unix.ultrix Subject: Re: unaligned data access - Ultrix 3.0 (RISC) Keywords: DS3100 Ultrix 3.0 RISC Errors Message-ID: <2678@decuac.DEC.COM> Date: 20 Jul 89 20:00:35 GMT References: <861@hadron.UUCP> Sender: news@decuac.DEC.COM Organization: Digital Equipment Corporation SWS Landover, Md. Lines: 53 In article <861@hadron.UUCP>, klr@hadron.UUCP (Kurt L. Reisler) writes: > 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" > > These message come out on stderr at sporatic intervals when programs > such as dtree are run. The program run fine otherwise. > > Any suggestions as to what is going on, and what might be able to be > done to eliminate the problem, other than diverting stderr to /dev/null. see nac(1) for more info on how to shut off the messages. Those "annoying" messages are coming from the Ultrix Kernel which has added support on the DECstation to catch unaligned data accesses and fix them dynamically for your program and let it continue running (an obvious performance hit which you can fix by aligning the offending variables in your source - the trick is finding them!) VAXen are more forgiving in this area. The DECstation 3100 assumes that ints and pointers are aligned on longword (4byte) boundaries and that shorts are aligned on halfword (2byte) boundries. Here's an example of unaligned data you can try on your 3100. unaligned.c -------------------- main() { short a = 1; short b = 2; printem(&a,&b); } printem(x,y) int *x; int *y; { printf("%d %d\n",*x,*y); } ----------------------- Hope this helps, chris