Date: Tue, 25 Aug 1998 16:38:12 +0200 From: Martin Cracauer <cracauer@cons.org> To: Stephen Hocking-Senior Programmer PGS Tensor Perth <shocking@prth.pgs.com>, current@FreeBSD.ORG Subject: Re: Floating Point Exceptions, signal handlers & subsequent ops Message-ID: <19980825163812.A9088@cons.org> In-Reply-To: <199808250753.PAA29567@ariadne.tensor.pgs.com>; from Stephen Hocking-Senior Programmer PGS Tensor Perth on Tue, Aug 25, 1998 at 03:53:48PM %2B0800 References: <199808250753.PAA29567@ariadne.tensor.pgs.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In <199808250753.PAA29567@ariadne.tensor.pgs.com>, Stephen Hocking-Senior Programmer PGS Tensor Perth wrote: > > I've noticed in one of my applications that the first FP operation after > return from a caught SIGFPE is invalid. I have a signal handler installed that > just prints out some basic info (like "SIGFPE caught"). The first FP op after > this (in my case, converting a long to a double) just gives garbage. Repeat > the same statement and it gives a sensible result. Has anyone else seen this > before I file a PR with code to reproduce the problem? Are you sure your signal handler doesn't do anything it shouldn't? For example, printf causes manipulation of FP flags and these affect the operation that may be in progress in your main code path. ANSI C just allows manipulation of 'volatile sig_atomic_t' variables. Posix adds many systems calls (amoung them read/write), but most C library stuff isn't suported. Please post a working example or at least your signal handler. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer BSD User Group Hamburg, Germany http://www.bsdhh.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980825163812.A9088>