#2128: Space leak with :trace
-------------------------+--------------------------------------------------
Reporter: mnislaih | Owner:
Type: bug | Status: new
Priority: normal | Component: GHCi
Version: 6.8.2 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: MacOS X
-------------------------+--------------------------------------------------
There is some ugly space behaviour going on with :trace.
I noticed while during a long running debugging session. My program runs
for about 30 seconds (under ghci) and then throws a stack overflow
exception. It does run in around 64M constant space.
While launched under :trace, the space usage grows constantly up to 3.5G,
and at this point my system dies, never reaching the exception.
I have been able to replicate using a smaller example.
{{{
import Data.List
loop x = if x == 0 then 0 : loop 1 else 0 : loop 0
main = print (foldl' (+) 0 (loop 1))
}}}
Under ghci 6.8.2,
1) :main runs in 30M constant space,
2) :trace main does not.
Launching ghci with a heap space limit, e.g. +RTS -M300M, makes 2)
eventually crash.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2128>
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