Date: Mon, 10 Apr 2000 20:48:48 -0400 (EDT) From: aa8vb@ipass.net To: FreeBSD-gnats-submit@freebsd.org Cc: aa8vb@ipass.net Subject: i386/17914: float-to-double core dump on 3.4R Message-ID: <200004110048.UAA13808@rr.com>
next in thread | raw e-mail | index | archive | help
>Number: 17914 >Category: i386 >Synopsis: float-to-double core dump on 3.4R >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Apr 10 17:50:00 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Randall Hopper >Release: FreeBSD 3.4-RELEASE i386 >Organization: self >Environment: Stock 3.4-RELEASE (gcc 2.7.2.3 as shipped) >Description: #include <float.h> 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). >How-To-Repeat: Paste the above snippet into a .c file, compile with cc -o tst tst.c, and execute. >Fix: Unknown. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004110048.UAA13808>