*BSD News Article 65334


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!swrinde!newsfeed.internetmci.com!news.mathworks.com!fu-berlin.de!news.belwue.de!news.uni-stuttgart.de!news.ruhr-uni-bochum.de!news.rwth-aachen.de!newsserver.rrzn.uni-hannover.de!tubsibr!malibu.ts.rz.tu-bs.de!not-for-mail
From: mb@malibu.ts.rz.tu-bs.de (Martin Butkus)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: gdb on freeBSD
Date: 7 Apr 1996 09:27:15 +0200
Organization: TU Braunschweig, Germany
Lines: 38
Distribution: world
Message-ID: <4k7qoj$4mc@malibu.ts.rz.tu-bs.de>
References: <4jtg1o$kam@holodeck.iss.nus.sg>
Reply-To: M.Butkus@tu-bs.de
NNTP-Posting-Host: rzrtr1.rz.tu-bs.de
X-Newsreader: TIN [version 1.2 PL2]
Originator: y0001415@ws.rz.tu-bs.de

Wan Kong Wah (kongwah@iss.nus.sg) wrote:

: Hi,

: I am stuck with running my program on a Pentium running
: freeBSD 2.1.0-RELEASE. I have compiled it using gcc, and
: on running with gdb, I have the following:


: Program received signal SIGFPE, Arithmetic exception.

It's an fpe. These occur when there is an overflow/underflow
or other problems such as division by zero. Some programs
do not except them to happen in which case they can be masked
with 

#include <floatigpoint.h>

main()
{
fpsetmask(0);
/* the rest of the program */
}


See fpsetmask(3).

: Though it stops at the exp() function, I am suspecting that there
: is not the problem is. Maybe there is a leak somewhere.

: The same s/w runs OK on DEC OS, Sun Solaris.

If so, the call to fpsetmask should fix your problem.

--
Martin Butkus					>>> Live long and prosper. <<<
Phone/Fax: +49.5331.298710
Am Stadtwege 10, 38304 Wolfenbuettel, Germany