#7052: Numeric types’ Read instances use exponential CPU/memory
--------------------------------------+-------------------------------------
  Reporter:  andersk                  |          Owner:                  
      Type:  bug                      |         Status:  new             
  Priority:  normal                   |      Milestone:                  
 Component:  libraries/base           |        Version:  7.4.2           
Resolution:                           |       Keywords:                  
        Os:  Unknown/Multiple         |   Architecture:  Unknown/Multiple
   Failure:  Runtime performance bug  |     Difficulty:  Unknown         
  Testcase:                           |      Blockedby:                  
  Blocking:                           |        Related:  #5688           
--------------------------------------+-------------------------------------
Changes (by andersk):

  * status:  closed => new
  * version:  7.4.1 => 7.4.2
  * resolution:  fixed =>


Comment:

 Okay hold on, there’s still something wrong in 7.4.2 (I just downloaded
 ghc-7.4.2-x86_64-unknown-linux.tar.bz2).

 {{{
 > read ("1e" ++ show (2^63 - 2)) :: Double
 Infinity  -- Fine.
 > read ("1e" ++ show (2^63 - 1)) :: Double
 0.0       -- What?
 > read ("1e" ++ show (2^64 - 2^10 - 2)) :: Double
 0.0       -- What?
 > read ("1e" ++ show (2^64 - 2^10 - 1)) :: Double
           -- Memory-eating infinite loop!
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7052#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to