#5773: main = forever (putStrLn =<< getLine)   continuously saturates a CPU when
compiled
-------------------------------+--------------------------------------------
    Reporter:  lpsmith         |       Owner:  simonmar               
        Type:  bug             |      Status:  new                    
    Priority:  highest         |   Milestone:  7.4.1                  
   Component:  Compiler        |     Version:  7.4.1-rc1              
    Keywords:                  |          Os:  Linux                  
Architecture:  x86_64 (amd64)  |     Failure:  Runtime performance bug
  Difficulty:  Unknown         |    Testcase:                         
   Blockedby:                  |    Blocking:                         
     Related:                  |  
-------------------------------+--------------------------------------------

Comment(by marlowsd@…):

 commit fac8ecbbafde17dd92439c41747223c43e9d2b80
 {{{
 Author: Simon Marlow <[email protected]>
 Date:   Mon Jan 16 09:49:24 2012 +0000

     Fix bug causing polling instead of blocking in the non-threaded RTS
 (#5773)

     This was a regression introduced accidentally in
     6b1098511aaabd2c9503ee7be6da1944466f9cb4.  We were previously passing
     a large time value to select() to simulate blocking, and this broke
     due to a change from unsigned to signed arithmetic.  I've refactored
     it to be less fragile now - we just pass NULL as the timeval parameter
     to select(), which is the correct way to do blocking.

  rts/posix/Select.c |   35 +++++++++++++++++------------------
  1 files changed, 17 insertions(+), 18 deletions(-)
 }}}

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to