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 From: Alex Rhomberg Subject: Re: What causes a Floating Poing Exception error? Date: 2000/02/01 Message-ID: <3896D3A2.458D878F@ife.ee.ethz.ch>#1/1 X-Deja-AN: 580317984 Content-Transfer-Encoding: 7bit References: <876gcd$96v$1@nnrp1.deja.com> Content-Type: text/plain; charset=us-ascii X-Trace: 1 Feb 2000 13:37:54 +0100, beethoven.ee.ethz.ch Organization: Electronics Lab, ETH Zurich, Switzerland MIME-Version: 1.0 Newsgroups: comp.os.linux.alpha [there does not seem to be a group comp.os.linux. development.system also removed] Dr. Unk wrote: > > I have a few questions that I need to know the answers too, or at least > some insight. The questions are about Floating Point Exceptions > errors. The reason that I ask these questions is that I compile the > packages that I download, and if not all, most of them are coded, > compiled and tested on PC's, not Alphas. Are FPE's the similar to > Segmentation fault's? They are similar in that they cause the program to dump core and abort > 1. What causes FPE errors? Using FP math that is not implemented on the Alpha. Like working with denormalized numbers or Inf or NaNs. > 2. What can be done to fix or prevent them, coding-wise? Don't call that FP math. It should rarely be a problem to avoid them. > 3. Same 2 questions but for Segmentation fault's. Segfaults occur when you try to access some memory you're not allowed to access. Often caused by a bad pointer, e.g. a null pointer. load the core dump into the debugger and look at the pointer. It's often easy to find the culprit. > 4. Does it have anything to do with architecture dependent code or > system libraries? The segfaults can be caused by bad code that is architecture dependend because it relies on pointers fitting into integers. This results in compiler warnings and possible core dumps. - Alex