[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 11:30:29 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):
Replying to [comment:45 maeder]:
> In this case, just checking the exponent against MAX_EXP and MIN_EXP is
not enough. The length of the leading fractional needs to be considered,
too, i.e. for extreme examples like "1000000000000000000e-1022" or
"0.00000000000000000000001e1023".
This means checking the exponent size after normalizing the fraction
(starting with 1).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5688#comment:46>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list