-
Notifications
You must be signed in to change notification settings - Fork 11
Real.fromLargeInt crashes on large integer input #69
Copy link
Copy link
Closed
Labels
basis-libproblem with Standard ML Basis libraryproblem with Standard ML Basis librarybugSomething isn't workingSomething isn't workingfixed-in-110.99.3issues that will be fixed in the 110.99.3 versionissues that will be fixed in the 110.99.3 versionfloating-pointproblem related to floating-point operationsproblem related to floating-point operationsgforgebug (or feature request) ported from smlnj-gforge repositorybug (or feature request) ported from smlnj-gforge repository
Metadata
Metadata
Assignees
Labels
basis-libproblem with Standard ML Basis libraryproblem with Standard ML Basis librarybugSomething isn't workingSomething isn't workingfixed-in-110.99.3issues that will be fixed in the 110.99.3 versionissues that will be fixed in the 110.99.3 versionfloating-pointproblem related to floating-point operationsproblem related to floating-point operationsgforgebug (or feature request) ported from smlnj-gforge repositorybug (or feature request) ported from smlnj-gforge repository
Type
Fields
Give feedbackNo fields configured for issues without a type.
Version
v110.99.1
Operating System
OS Version
WSL
Processor
x86 (32-bit)
Component
Basis Library
Severity
Minor
Description of the problem
Real.fromLargeInt (IntInf.pow (2, 4000))causes the runtime to exit with the following message:/path/to/sml: Fatal error -- bogus overflow fault: pc = 0x556375360f1b, sig = 11
Additional comments:
This is not an issue with
IntInf.pow, that part runs fine.It also causes the error immediately, so I don't think it is a stack overflow issue.
Transcript
Expected Behavior
No response
Steps to Reproduce
Additional Information
No response
Email address
ssoss@uchicago.edu
Comments from smlnj-gforge
Original smlnj-gforge bug number 313
Submitted via web form by Skye Soss ssoss@uchicago.edu on 2022-06-02 at 19:21:00
Keywords: reals, IntInf
comment by @JohnReppy on 2022-06-27 22:59:00 +000 UTC
Fixed for 110.99.3 and 2022.1. The assembly code for the AMD64 now returns infinity when the scaled exponent exceeds the maximum allowed.