[GHC] #7087: 'select' fails for very large arguments to 'threadDelay'

GHC cvs-ghc at haskell.org
Fri Jul 20 21:00:35 CEST 2012


#7087: 'select' fails for very large arguments to 'threadDelay'
---------------------------+------------------------------------------------
 Reporter:  Gabriel439     |          Owner:                    
     Type:  bug            |         Status:  new               
 Priority:  normal         |      Component:  Compiler          
  Version:  7.4.1          |       Keywords:  threadDelay select
       Os:  Linux          |   Architecture:  x86_64 (amd64)    
  Failure:  Runtime crash  |       Testcase:                    
Blockedby:                 |       Blocking:                    
  Related:                 |  
---------------------------+------------------------------------------------
 The following program crashes GHC with an internal error:

 import Control.Concurrent

 main = threadDelay 9223372036840001

 That seems to be the smallest value that still crashes threadDelay.  The
 next smallest value works.  Interestingly, the largest value that works
 happens to be equal to:

 ((maxBound :: Int) `div` 10^7 - 1) * 10^4

 ... for whatever that's worth.

 If you compile this (with or without optimizations) on ghc-7.4.1, the
 program crashes with the following error message:

 select: Invalid argument
 bug: internal error: select failed
     (GHC version 7.4.1 for x86_64_unknown_linux)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 Aborted

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



More information about the Glasgow-haskell-bugs mailing list