[GHC] #5688: instance Read Integer/Rational/Double readsPrec out of memory and crash due to exponential notation
GHC
cvs-ghc at haskell.org
Mon Dec 12 16:13:38 CET 2011
#5688: instance Read Integer/Rational/Double readsPrec out of memory and crash due
to exponential notation
---------------------------------+------------------------------------------
Reporter: gracjan | Owner:
Type: bug | Status: patch
Priority: highest | Milestone: 7.4.1
Component: libraries/base | Version: 6.12.3
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Runtime crash
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by maeder):
While read fails, 10.10 is a legal Rational Haskell value
{{{
*Main> 10.10 :: Rational
101 % 10
*Main> read "10.10" :: Rational
*** Exception: Prelude.read: no parse
}}}
and
{{{
main = print (1E100000000000 :: Rational)
}}}
crashes the compiler as happens without type annotation currently.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5688#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list