#2408: threadWaitRead on mingw32 threaded causes internal error
-----------------------+----------------------------------------------------
    Reporter:  kirby   |       Owner:          
        Type:  bug     |      Status:  new     
    Priority:  normal  |   Component:  Compiler
     Version:  6.8.3   |    Severity:  normal  
    Keywords:          |    Testcase:          
Architecture:  x86     |          Os:  Windows 
-----------------------+----------------------------------------------------
 threadWaitRead (used in 6.8.x to avoid the non-interruptable getChar)
 causes internal error on GHC 6.8.2 and 6.8.3:

 {{{
 prompt: test: internal error: waitRead# on threaded RTS
     (GHC version 6.8.2 for i386_unknown_mingw32)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug

 This application has requested the Runtime to terminate it in an unusual
 way.
 Please contact the application's support team for more information.
 }}}

 This is because in GHC.Conc:
 {{{
 threadWaitRead :: Fd -> IO ()
 threadWaitRead fd
 #ifndef mingw32_HOST_OS
   | threaded  = waitForReadEvent fd
 #endif
   | otherwise = IO $ \s ->
         case fromIntegral fd of { I# fd# ->
         case waitRead# fd# s of { s -> (# s, () #)
         }}
 }}}
 So the threaded case is ignored on mingw32, and waitRead# crashes on
 threaded RTS.
 It should be at least written on the threadWaitRead documentation, and a
 workaround provided.

 I've attached a little program to show the issue (if compiled with
 -threaded on windows).

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2408>
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

Reply via email to