From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,634f5dd99fd9ecf3 X-Google-Attributes: gid111c93,public From: Alex Rhomberg Subject: Re: Unaligned trap Date: 1999/12/02 Message-ID: <38463D77.CEFF2D96@ife.ee.ethz.ch>#1/1 X-Deja-AN: 555705624 Content-Transfer-Encoding: 7bit References: <38453EE6.3553935A@kdc.no> <824bou$c0e$1@nntp1.atl.mindspring.net> <3845CD8F.BFCB1B12@kdc.no> Content-Type: text/plain; charset=us-ascii X-Trace: 2 Dec 1999 10:35:51 +0100, beethoven.ee.ethz.ch Organization: Electronics Lab, ETH Zurich, Switzerland MIME-Version: 1.0 Newsgroups: comp.os.linux.alpha Idar Tollefsen wrote: > > Pierre Asselin wrote: > > > The program tried to load or store a word from/to a memory address that > > is not a multiple of the word size. The hardware trapped, the OS kicked > > in and performed the memory access byte by byte on behalf of the program, > > logged the event in syslog, and marked the process as runnable again to > > resume after the trapped instruction. It's harmless, it just slows down > > the running program. > > > This is more common on alphas because long integers must be aligned > > on 8-byte boundaries. Programs developed on x86's often assume that > > 4-byte alignment is enough. > > Thank you. This cleared things up. And it's good to know it's not damaging > to the system. > > A logical follow up question: Can anything be done about this? Additional clarification: Many of the unaligned traps appeared when time_t switched from int to long with (internally with kernel 2.1, the API switched with glibc 2.1) The funniest was when ping stopped working... What you can do is: patch the software. Go into a debugger and look at the address given in the console message. Check for bad memory accesses. The easy way to change it is to memcpy the information from an unaligned location to an aligned one. - Alex