|
#7034: reading a large double results in zero with ghc-7.4.2
------------------------------+--------------------------------------------- Reporter: maeder | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.2 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Testcase: Blockedby: | Blocking: Related: | ------------------------------+--------------------------------------------- {{{ Prelude> read "1E100000000000000000000" :: Double Infinity Prelude> read "1E1000000000000000000000" :: Double 0.0 }}} This was probably introduced by the fix for #5688. Note that #3897 is still open. {{{ Prelude> 1E1000000000000000000000 :: Double }}} takes too long and sometimes results in 0.0 or in a memory crash -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7034> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
#7034: reading a large double results in zero with ghc-7.4.2
------------------------------+--------------------------------------------- Reporter: maeder | Owner: Type: bug | Status: new Priority: normal | Component: Compiler Version: 7.4.2 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Testcase: Blockedby: | Blocking: Related: | ------------------------------+--------------------------------------------- Comment(by maeder): It seems that the exponent is parsed as Int without checking overflow {{{ Prelude> 100000000000000000000 :: Int 1661992960 Prelude> 1000000000000000000000 :: Int -559939584 }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7034#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
In reply to this post by GHC
#7034: reading a large double results in zero with ghc-7.4.2
---------------------------------+------------------------------------------ Reporter: maeder | Owner: pcapriotti Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.4.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by pcapriotti): * owner: => pcapriotti * difficulty: => Unknown Comment: Thanks for the report. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7034#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
In reply to this post by GHC
#7034: reading a large double results in zero with ghc-7.4.2
---------------------------------+------------------------------------------ Reporter: maeder | Owner: pcapriotti Type: bug | Status: new Priority: normal | Milestone: 7.6.1 Component: Compiler | Version: 7.4.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by pcapriotti): * milestone: => 7.6.1 -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7034#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
|
In reply to this post by GHC
#7034: reading a large double results in zero with ghc-7.4.2
-------------------------------+-------------------------------------------- Reporter: maeder | Owner: pcapriotti Type: bug | Status: closed Priority: normal | Milestone: 7.6.1 Component: Compiler | Version: 7.4.2 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: T7034 | Blockedby: Blocking: | Related: #5692 -------------------------------+-------------------------------------------- Changes (by pcapriotti): * status: new => closed * testcase: => T7034 * resolution: => fixed * related: => #5692 Comment: Fixed by: {{{ commit 4226bae42fdd666c15190ac2f8784547d3fbad5f Author: Paolo Capriotti <[hidden email]> Date: Mon Jul 2 12:54:57 2012 +0100 Fix parsing of RealFloat with huge exponents (#7034). Ensure numberToRangedRational returns Nothing immediately if the exponent is outside Int range, so that we avoid an integer overflow later. }}} This only covers the failure for `read` in base. The failure in the lexer is tracked by #5692. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7034#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler _______________________________________________ Glasgow-haskell-bugs mailing list [hidden email] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs |
| Powered by Nabble | Edit this page |
