#3429: Segfault when running with +RTS -N2
-------------------------------+--------------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: high | Milestone: 6.12.1
Component: Compiler | Version: 6.11
Severity: normal | Keywords:
Difficulty: Unknown | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-------------------------------+--------------------------------------------
This program:
{{{
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Exception
import System.IO
main :: IO ()
main = do hSetBuffering stdout NoBuffering
let loop = doit >> loop
loop
doit :: IO ()
doit = do v <- newMVar '.'
t <- forkIO (foo v)
threadDelay 1000
killThread t
takeMVar v >>= putChar
foo :: MVar Char -> IO ()
foo v = do let loop = do withMVar v $ \x -> evaluate x
loop
loop
}}}
segfaults for me on amd64/Linux when compiled with a validated HEAD and
run with `+RTS -N2`:
{{{
$ ghc --make j -threaded
[1 of 1] Compiling Main ( j.hs, j.o )
Linking j ...
$ ./j +RTS -N2
zsh: segmentation fault ./j +RTS -N2
$ ./j +RTS -N2
......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................zsh:
segmentation fault ./j +RTS -N2
$ ./j +RTS -N2
...........................................zsh: segmentation fault ./j
+RTS -N2
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3429>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs