#367: Infinite loops can hang Concurrent Haskell
------------------------------------------+---------------------------------
  Reporter:  simonpj                      |          Owner:  ezyang             
 
      Type:  bug                          |         Status:  new                
 
  Priority:  lowest                       |      Milestone:  _|_                
 
 Component:  Compiler                     |        Version:  6.4.1              
 
Resolution:  None                         |       Keywords:  scheduler 
allocation
        Os:  Unknown/Multiple             |   Architecture:  Unknown/Multiple   
 
   Failure:  Incorrect result at runtime  |     Difficulty:  Unknown            
 
  Testcase:                               |      Blockedby:                     
 
  Blocking:                               |        Related:                     
 
------------------------------------------+---------------------------------

Comment(by simonmar):

 You could improve code size by omitting the `HpAlloc = 0` assignment
 (perhaps making sure that it is initialized to zero in `LOAD_THREAD_STATE`
 or something).

 Another alternative is to use `SpLim` instead of `HpLim` to trigger the
 interrupt, on the grounds that there are more stack checks than heap
 checks.  We would have to put `SpLim` in a memory location instead of a
 register, but we could move `HpLim` into a register.

 Something else we could do is add a flag on every top-level function to
 say whether it is non-allocating (rather like the `NoCafRefs` flag), and
 we could use that to optimise away many of the extra checks.

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

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

Reply via email to