Re: [GHC] #7325: threadDelay mistreats minBound and maxBound in some configurations

2012-10-22 Thread GHC
#7325: threadDelay mistreats minBound and maxBound in some configurations
-+--
Reporter:  joeyadams |   Owner: 
Type:  bug   |  Status:  new
Priority:  high  |   Milestone:  7.6.2  
   Component:  Runtime System| Version:  7.6.1  
Keywords:|  Os:  Unknown/Multiple   
Architecture:  Unknown/Multiple  | Failure:  Incorrect result at runtime
  Difficulty:  Unknown   |Testcase: 
   Blockedby:|Blocking: 
 Related:|  
-+--
Changes (by simonmar):

  * priority:  normal => high
  * difficulty:  => Unknown
  * milestone:  => 7.6.2


Comment:

 See #6019 for the `maxBound` problem.  I haven't investigated the
 `minBound` problem yet.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


Re: [GHC] #7325: threadDelay mistreats minBound and maxBound in some configurations

2012-10-13 Thread GHC
#7325: threadDelay mistreats minBound and maxBound in some configurations
-+--
 Reporter:  joeyadams|  Owner:  
 Type:  bug  | Status:  new 
 Priority:  normal   |  Component:  Runtime System  
  Version:  7.6.1|   Keywords:  
   Os:  Unknown/Multiple |   Architecture:  Unknown/Multiple
  Failure:  Incorrect result at runtime  |   Testcase:  
Blockedby:   |   Blocking:  
  Related:   |  
-+--
Changes (by tibbe):

 * cc: johan.tibell@… (added)


-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #7325: threadDelay mistreats minBound and maxBound in some configurations

2012-10-13 Thread GHC
#7325: threadDelay mistreats minBound and maxBound in some configurations
-+--
 Reporter:  joeyadams|  Owner:  
 Type:  bug  | Status:  new 
 Priority:  normal   |  Component:  Runtime System  
  Version:  7.6.1|   Keywords:  
   Os:  Unknown/Multiple |   Architecture:  Unknown/Multiple
  Failure:  Incorrect result at runtime  |   Testcase:  
Blockedby:   |   Blocking:  
  Related:   |  
-+--
 threadDelay currently treats minBound and maxBound incorrectly in some
 cases.  This breaks the following idiom
 ([http://hackage.haskell.org/packages/archive/async/latest/doc/html/src
 /Control-Concurrent-Async.html#Concurrently as seen in the async
 package]):

 {{{
 forever (threadDelay maxBound)
 }}}

 On Linux (Ubuntu 10.04 64-bit) without -threaded, {{{threadDelay
 maxBound}}} returns immediately.  For lower numbers on the same order of
 magnitude, it behaves non-deterministically.  For example, given this
 program:

 {{{
 import Control.Concurrent
 import Control.Monad

 main = forM_ [6244222868950683224..] $ \i -> do
 print i
 threadDelay i
 }}}

 threadDelay returns immediately in some cases but not in others.  If I
 compile and run it in bash like this:

 {{{
 ghc-7.6.1 -fforce-recomp threadDelay-maxBound.hs ; ./threadDelay-maxBound
 }}}

 The bug usually appears, but if I run it like this:

 {{{
 ghc-7.6.1 -fforce-recomp threadDelay-maxBound.hs
 ./threadDelay-maxBound
 }}}

 The bug does not appear (threadDelay blocks like it should).  Thus, the
 program is affected by a very subtle difference in how it is invoked.
 Perhaps it is sensitive to file descriptor numbers.

 On Windows without -threaded, {{{threadDelay maxBound}}} seems to work,
 but {{{threadDelay minBound}}} blocks rather than returning immediately.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs