From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,ddfd8abfcc735b46 X-Google-Attributes: gid111c93,public X-Google-Thread: f9382,ddfd8abfcc735b46 X-Google-Attributes: gidf9382,public From: "Brendan Murray" Subject: Re: What causes a Floating Poing Exception error? Date: 2000/02/02 Message-ID: #1/1 X-Deja-AN: 580620697 References: <876gcd$96v$1@nnrp1.deja.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.5600 X-Complaints-To: abuse@mediaone.net X-Trace: wbnws01.ne.mediaone.net 949458157 24.218.112.69 (Tue, 01 Feb 2000 21:22:37 EST) Organization: Road Runner X-MSMail-Priority: Normal Reply-To: "Brendan Murray" NNTP-Posting-Date: Tue, 01 Feb 2000 21:22:37 EST Newsgroups: comp.os.linux.alpha,comp.os.linux "Dr. Unk" wrote in message news:876gcd$96v$1@nnrp1.deja.com... > 4. Does it have anything to do with architecture dependent code or > system libraries? It can. If you're trying to access a 16-bit datum via a pointer that points to an odd byte address on e.g. a SPARC, you'll get an alignment interrupt which can, depending on the compiler switches, result in a segmentation fault. Similarly, accessing a 32-bit entity on a non-four-bytye-aligned address causes the same thing. For 64-bit processors, this is much more likely. I notice you've posted this to the alpha newsgroup, so this may be relevant. I've just finished porting some code to Sparc Ultra and our code was sprinkled with just such misaligned code, despite it being OK for 32-bit alignment. The problem is that a long is now 64 bits, which screwed everything up. On machines with Intel processors, this doesn't happen. B=