Date: Tue, 13 Jul 1999 12:27:40 +0100 (BST) From: m.seaman@inpharmatica.co.uk To: FreeBSD-gnats-submit@freebsd.org Subject: alpha/12623: strtod(3) FPE on alphaev56 Message-ID: <199907131127.MAA09770@b0.farm.inpharmatica.co.uk>
next in thread | raw e-mail | index | archive | help
>Number: 12623 >Category: alpha >Synopsis: Certain valid numeric strings cause a SIGFPE when attempting >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-alpha >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jul 13 04:30:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Matthew Seaman >Release: FreeBSD 3.2-STABLE alpha >Organization: Inpharmatica Ltd >Environment: b0:/tmp:% uname -a FreeBSD b0.farm.inpharmatica.co.uk 3.2-STABLE FreeBSD 3.2-STABLE #0: Thu Jul 8 09:04:16 BST 1999 matthew@b0.farm.inpharmatica.co.uk:/usr/src/sys/compile/FARM alpha >Description: Attempting to convert the string "2.49521e-297" into a double precision value via strtod(3) results in a floating point exception on the alphaev56 CPU. The problem doesn't occur on i586. The problem is sensitive to both the mantissa and exponent of the number: the following values are known to trigger the bug: 2.49521e-297 3.35554e-295 1.14662e-292 1.14e-293 2.495e-293 2.49e-294 2.4e-293 1e-305 whereas these do not: 2.4e-292 2.49521e-292 2.4951e-293 1.14e-292 1.15e-293 >How-To-Repeat: #include <stdlib.h> int main (int argc, char *argv[]) { char str[32] = "2.49521e-297"; double num; num = strtod (str, NULL); } >Fix: not known >Release-Note: >Audit-Trail: >Unformatted: to convert to double To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907131127.MAA09770>