Overview
| Artifact ID: | dbb4ae0792b7c381faa3910af79c47c1b4e9a980 |
|---|---|
| Ticket: | 219046ffffffffffffffffffffffffffffffffff
Tcl_GetDouble fails with unknown floating point error |
| User & Date: | nobody on 2000-10-26 01:09:52 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 4118 Bug Version: 8.2.3 SubmitDate: '2000-02-03' LastModified: '2000-03-31' Severity: CRIT Status: Released Submitter: techsupp ChangedBy: ericm OS: Linux-Red Hat OSVersion: RedHat Linux 5.2 (Linux 2.2.11) Machine: Digital HiNote VP (portable) FixedDate: '2000-03-31' FixedInVersion: 8.3.1 ClosedDate: '2000-10-25' Name: Eivind Tagseth ObservedBehavior: As far as I can see there is a small bug in tcl 8.2.3 in Tcl_GetDouble(). The function checks errno after calling strtod, but fails to check the return value of strtod. On my system strtod returns 1 as it should, but errno is set to 84, causing Tcl_GetDouble to fail. DesiredBehavior: I expect Tcl_GetDouble to fail only if strtod's return value indicates that something went wrong. Patch: --- tcl8.2.3/generic/tclGet.c Fri Apr 16 02:46:46 1999 +++ tcl8.2.3/generic/tclGet.new.c Thu Feb 3 10:10:09 2000 @@ -220,7 +220,7 @@ } return TCL_ERROR; } - if (errno != 0) { + if (errno != 0 && (d == HUGE_VAL || d == -HUGE_VAL || d == 0)) { if (interp != (Tcl_Interp *) NULL) { TclExprFloatError(interp, d); } PatchFiles: generic/tclGet.c Thanks for the patch. I applied it to the sources in CVS, and the fix will go out with 8.3.1. - eric -- 03/31/2000 ericm - foundin changed to: "final: 8.2.3"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to:
Tcl_GetDouble fails with unknown floating point error
- type changed to: "Bug"