[GHC] #8083: setNumCapabilities broken in HEAD

GHC ghc-devs at haskell.org
Mon Jul 22 18:06:30 CEST 2013


#8083: setNumCapabilities broken in HEAD
--------------------------+------------------------------------------------
       Reporter:  parcs   |             Owner:
           Type:  bug     |            Status:  new
       Priority:  normal  |         Milestone:
      Component:          |           Version:  7.7
  Runtime System          |  Operating System:  Unknown/Multiple
       Keywords:          |   Type of failure:  Incorrect result at runtime
   Architecture:          |         Test Case:
  Unknown/Multiple        |          Blocking:
     Difficulty:          |
  Unknown                 |
     Blocked By:          |
Related Tickets:          |
--------------------------+------------------------------------------------
 {{{
 #!haskell
 import GHC.Conc
 import Control.Monad

 main :: IO ()
 main = do
     n <- getNumCapabilities
     when (n == 1) $ setNumCapabilities 2
     print ()
 }}}

 One would expect this program to print () just once, but when compiled
 with -O or -O2 it prints () repeatedly and indefinitely!

 This doesn't happen on GHC 7.6.2 or 7.4.1, only on HEAD.

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8083>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler




More information about the ghc-tickets mailing list