From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,37b2c474e942b6b5 X-Google-Attributes: gid111c93,public From: Tony Hammitt Subject: Re: unalligned trap at XXXXXXXXXXXXXXXX: XXXXXXXXXXXXXXXX XX X Date: 2000/04/18 Message-ID: <38FCC042.AB9972EB@kc.rr.com>#1/1 X-Deja-AN: 612826276 Content-Transfer-Encoding: 7bit References: <8didj2$44f$1@news.hccnet.nl> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@rr.com X-Trace: typhoon1.kc.rr.com 956088388 24.94.177.44 (Tue, 18 Apr 2000 15:06:28 CDT) MIME-Version: 1.0 Reply-To: thammitt@kc.rr.com NNTP-Posting-Date: Tue, 18 Apr 2000 15:06:28 CDT Newsgroups: comp.os.linux.alpha "m.toonen" wrote: > > My alpha computer XL266-EV45 is running RedHat 5.2 > With the egcs compiler version 2.91 > and a Matrox Millenium video card. > > Who knows why linux sometimes reports the message: > unalligned trap at XXXXXXXXXXXXXXXX: XXXXXXXXXXXXXXXX XX X > > And if you know, what should be done to avoid them. General info: Unaligned traps happen when the data in memory is arranged for one type of architecture (like x86) and is ported to some other architecture with different memory arrangement rules (like Alpha). An example: On intel 'long' data type is 4 bytes, on Alpha, 'long' is 8 bytes. Alphas expect that all long's will be found at memory addresses that are a multiple of 8. Since 8 is the size of pointers and longs on Alphas, all return values (addresses) from memory allocators are multiples of at least 8, but some older programs just assumed that their data would be aligned for 4 byte pointers. So, when a 'long' is located at a multiple of 4, and not 8 bytes in memory, the kernel notices this and complains by issuing the unaligned trap. This does not really affect the behavior of the program, it just makes it run lots slower. It can indicate serious problems with the program if the misaligned data is a pointer and half of it is being overwritten with other data, which can happen with some very badly written programs. Don't bet on it, I really doubt that anything that bad would even run long enough to be released. The solution is typically to fix and recompile the applications with no assumptions about the size of data types. This can be a bit of work. I'd probably recommend that you upgrade to the latest release of RedHat, since other people have probably fixed the programs by now. Which application is giving the unaligned trap? I think that they can be logged to the system log in /var/log/messages, which should report what program caused the error. Best of luck getting this fixed. These types of errors are precisely why I have an Alpha, an intel and a PPC. If I get the same results on all these, I'm pretty sure I don't have any glaring bugs... Regards, Tony Hammitt