[GHC] #2848: threadDelay can wait forever, next time on January 22, 2009, around 20:00 UTC.

GHC trac at galois.com
Tue Dec 9 06:38:43 EST 2008


#2848: threadDelay can wait forever, next time on January 22, 2009, around 20:00
UTC.
---------------------------------------------------------------+------------
    Reporter:  tomekz                                          |        Owner:  simonmar
        Type:  bug                                             |       Status:  closed  
    Priority:  high                                            |    Milestone:  6.10.2  
   Component:  Runtime System                                  |      Version:  6.8.1   
    Severity:  critical                                        |   Resolution:  fixed   
    Keywords:  ticks getourtimeofday threadDelay non-threaded  |   Difficulty:  Unknown 
    Testcase:                                                  |           Os:  Linux   
Architecture:  x86                                             |  
---------------------------------------------------------------+------------
Changes (by simonmar):

  * status:  new => closed
  * resolution:  => fixed

Comment:

 Thanks for a great bug report.  The code is now:

 {{{
   // Avoid overflow when we multiply seconds by 1000.  See #2848
   return (lnat)((StgWord64)tv.tv_sec * 1000 / interval +
                 (StgWord64)tv.tv_usec / (interval * 1000));
 }}}

 fixed by this patch:

 {{{
 Tue Dec  9 10:56:00 GMT 2008  Simon Marlow <marlowsd at gmail.com>
   * Fix #2848: avoid overflow during time calculation
 }}}

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


More information about the Glasgow-haskell-bugs mailing list