id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
2128,Space leak with :trace,mnislaih,igloo,"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.",bug,closed,normal,6.8 branch,GHCi,6.8.2,fixed,,mnislaih@…,MacOS X,Unknown/Multiple,,Unknown,,,,
