[GHC] #6146: Segmentation fault with eager blackholing

GHC cvs-ghc at haskell.org
Tue Jun 5 23:57:36 CEST 2012


#6146: Segmentation fault with eager blackholing
---------------------------+------------------------------------------------
 Reporter:  emcdowell      |          Owner:                   
     Type:  bug            |         Status:  new              
 Priority:  normal         |      Component:  Compiler         
  Version:  7.4.1          |       Keywords:  eager blackholing
       Os:  Windows        |   Architecture:  x86              
  Failure:  Runtime crash  |       Testcase:                   
Blockedby:                 |       Blocking:                   
  Related:                 |  
---------------------------+------------------------------------------------

Comment(by emcdowell):

 In trying to reproduce this I got different erroneous behavior.  When
 entering small input values the code behaves as expected.  When entering
 larger values, part of the output is truncated.  The following problem is
 easily reproduced on Windows XP.


 H:\user\haskell\Test>type Main.hs
 module Main (main) where

 main :: IO ()
 main = do
     putStrLn "First number?  "
     num1 <- readLn :: IO Int
     putStrLn "Second number? "
     num2 <- readLn :: IO Int
     let total = num1 + num2
     putStrLn $ "The sum is " ++ (show total) ++ "."

 H:\user\haskell\Test>ghc -feager-blackholing -threaded --make Main.hs
 [1 of 1] Compiling Main             ( Main.hs, Main.o )
 Linking Main.exe ...

 H:\user\haskell\Test>main +RTS -N
 First number?
 2
 Second number?
 3
 The sum is 5.

 H:\user\haskell\Test>main +RTS -N
 First number?
 2000000
 Second number?
 3000000
 5000000.

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



More information about the Glasgow-haskell-bugs mailing list