Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#234] Converting NaN to a string causes an infinite loop on 64-bit machines

Date:
2019-11-16 13:52
Priority:
3
State:
Closed
Submitted by:
Bug Submitter (webuser)
Assigned to:
John Reppy (jhr)
Machine Architecture:
x86
Operating System:
Generic Unix
Component:
Basis Library
Resolution:
Fixed
Severity:
Major
OS Version:
SML/NJ Version:
110.95
Keywords:
reals
URL:
Transcript (of reproduction):
<jhr@aeneas> sml Standard ML of New Jersey (64-bit) v110.95 [built: Sat Nov 09 20:01:23 2019] - Real.toString(0.0 / 0.0); [autoloading] [library $SMLNJ-BASIS/basis.cm is stable] [library $SMLNJ-BASIS/(basis.cm):basis-common.cm is stable] [autoloading done] ^Z[1] + Stopped sml
Source (for reproduction):
Real.toString(0.0 / 0.0);
Summary:
Converting NaN to a string causes an infinite loop on 64-bit machines

Detailed description
Attempting to print a NaN in the top-level loop or
calling Real.toString on a NaN causes an infinite loop.
Additional comments:
This example works on 32-bit executables.

Submitted via web form by John Reppy <jhr@cs.uchicago.edu>

Comments:

Message  ↓
Date: 2019-12-12 15:27
Sender: John Reppy

The problem was that floating-point comparisons where not handling NaNs correctly (this was an MLRisc bug). Fixed for 110.96.

Attached Files:

Changes

Field Old Value Date By
status_idOpen2019-12-12 15:27jhr
close_dateNone2019-12-12 15:27jhr
ResolutionAccepted As Bug2019-12-12 15:27jhr
assigned_tonone2019-11-16 13:55jhr
detailsAttempting to print a NaN in the top-level loop or calling Real.toString on a NaN causes an infinite loop. Additional comments: This example works on 32-bit executables. Submitted via web form by John Reppy <jhr@cs.uchicago.edu> 2019-11-16 13:55jhr
ResolutionNone2019-11-16 13:55jhr
Transcript (of reproduction)<jhr@aeneas> sml Standard ML of New Jersey (64-bit) v110.95 [built: Sat Nov 09 20:01:23 2019] - Real.toString(0.0 / 0.0); [autoloading] [library $SMLNJ-BASIS/basis.cm is stable] [library $SMLNJ-BASIS/(basis.cm):basis-common.cm is stable] [autoloading done] ^Z[1] + Stopped sml 2019-11-16 13:55jhr