[GHC] #367: Infinite loops can hang Concurrent Haskell
GHC
cvs-ghc at haskell.org
Mon Sep 24 10:20:26 CEST 2012
#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):
What you've done here is omit the yield checks on (some) case
alternatives. Which is almost ok, because all loops will go through a
function entry, except for let-no-escapes which use `altHeapCheck`. So
with this patch you won't catch non-allocating recursive let-no-escapes.
To make this correct you need to ensure that let-no-escapes get a yield
point too, but you could also omit the yield points from ordinary
`altHeapCheck`s which should reduce the code size hit further.
The confusion probably arose because of my naming scheme:
`altHeapCheckReturnsTo` is the heap check for a case alternative where the
case scrutinee made an external call, and hence had a "returns to"
continuation that we can re-use for the heap check's continuation.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/367#comment:26>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list