[GHC] #5688: instance Read Integer/Rational/Double readsPrec out of memory and crash due to exponential notation
GHC
cvs-ghc at haskell.org
Fri Mar 2 18:16:41 CET 2012
#5688: instance Read Integer/Rational/Double readsPrec out of memory and crash due
to exponential notation
-------------------------------+--------------------------------------------
Reporter: gracjan | Owner: igloo
Type: bug | Status: new
Priority: highest | Milestone: 7.4.2
Component: libraries/base | Version: 6.12.3
Resolution: | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Runtime crash | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
-------------------------------+--------------------------------------------
Comment(by maeder):
I think there was code to compute the exponent offset by the given
fractional part and the maximal exponent for a floating point type can be
computed by `floatRange` and `floatDigits`.
{{{
logBase 10 2 * fromIntegral (floatDigits 0) + logBase 10 2 * fromIntegral
(snd (floatRange 0))
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5688#comment:53>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list