#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): I think we could incorporate the patch, but not turn on the flag by default. If you want to work on it further and see if you can get the code size penalty down that would be great - my suggestion would be to do as I mentioned earlier and omit the yield check for functions which are guaranteed to yield within a finite time, because they only call other functions which have that property. You can assume that calling an arbitrary closure or a primop is guaranteed to yield. As a first step you can do the analysis within a module, the next step would be to extend it across module boundaries. We should check the primops to make sure that none of them hog the CPU for a long time. I think `newArray#` has this problem, because it fills in the array in a loop, so for a large array it won't yield quickly. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/367#comment:29> 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