id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
7087,'select' fails for very large arguments to 'threadDelay',Gabriel439,,"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",bug,closed,normal,7.6.1,Compiler,7.4.1,duplicate,threadDelay select,,Linux,x86_64 (amd64),Runtime crash,Unknown,,,,#6019
