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

[#191] Compiler crash when handling large reals

Date:
2017-11-01 20:39
Priority:
3
State:
Open
Submitted by:
Jackson Woodruff (jwoodruff)
Assigned to:
John Reppy (jhr)
Machine Architecture:
x86
Operating System:
None
Component:
Compiler
Resolution:
Accepted As Bug
Severity:
Minor
OS Version:
SML/NJ Version:
110.82 (trunk)
Keywords:
URL:
Transcript (of reproduction):
Source (for reproduction):
val x = 1e1000000
Summary:
Compiler crash when handling large reals

Detailed description
Hi all,

Currently, on input of reals out of the accepted range, SMLNJ crashes:

val x = 1e1000;;

Produces:

unexpected exception (bug?) in SML/NJ: BadReal [BadReal]
raised at: ../compiler/MiscUtil/bignums/realconst.sml:237.54-237.63
../compiler/Basics/stats/stats.sml:198.40
../compiler/Basics/stats/stats.sml:198.40
../compiler/TopLevel/interact/evalloop.sml:45.54

This happens in interactive sessions. When opening files, the assignments are ignored.

Thanks,

Jackson.

Comments:

Message  ↓
Date: 2017-11-01 21:15
Sender: John Reppy

We can fix this problem as part of the literal-representation overhaul. Currently, real literals are being represented as strings until code generation, which is too late to gracefully catch and handle this problem.

Attached Files:

Changes

Field Old Value Date By
assigned_tonone2017-11-01 21:15jhr
ResolutionNone2017-11-01 21:15jhr