From owner-freebsd-bugs Mon Apr 10 20:50: 4 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id F2BC337B9C5 for ; Mon, 10 Apr 2000 20:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id UAA44113; Mon, 10 Apr 2000 20:50:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Mon, 10 Apr 2000 20:50:02 -0700 (PDT) Message-Id: <200004110350.UAA44113@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Kevin Day Subject: Re: i386/17914: float-to-double core dump on 3.4R Reply-To: Kevin Day Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR i386/17914; it has been noted by GNATS. From: Kevin Day To: aa8vb@ipass.net Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: i386/17914: float-to-double core dump on 3.4R Date: Mon, 10 Apr 2000 22:47:51 -0500 (CDT) > #include > > main() > { > float f = FLT_MAX; > double d; > f = f * 2; > d = f; > } > > Delete the "d=f" line and it doesn't core. Put it in and it does > (floating-point exception). > > From this it appears there may be a bug in the float-to-double > promotion when f is Inf (or, at least I'd expect that f is Inf). > > Note that the core dump does not occur when the Inf is generated, > but only when it is promoted to a double. > > I first noticed this by trying to printf the value of f after f=f*2 > and got the same core-dump behavior (due to float-to-double arg > promotion). See 'man setfpmask'. The default behavior in 3.4 was to cause a SIGFPE if you do anything that causes an 'overflow' to be generated from the FPU. I admit this is weird that it's doing it here, but I don't claim to understand what happens in a case like this. :) (4.0 and higher changed their defaults to ignore certain exceptions) Kevin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message