id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
3429,Segfault when running with +RTS -N2,igloo,simonmar,"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
}}}
",bug,closed,high,6.12.1,Runtime System,6.11,fixed,,,Unknown/Multiple,Unknown/Multiple,,Unknown,,,,
