
23 Mar
2011
23 Mar
'11
1:42 p.m.
On 23 March 2011 17:19, Jake McArthur
On 03/23/2011 10:34 AM, Ketil Malde wrote:
It works (calling the same function) from GHCi, but breaks when compiled. Also when compiling with -O0.
Confirmed for GHC 7.0.2. Works fine in GHCi, but compiling it (in my case, with -O) and running the executable causes a stack overflow unless I run it with +RTS -K16m, and even then it spends 90% of its time in GC. This looks like it is probably a bug, to me. Maybe it should be reported in GHC's Trac?
It looks like a bug indeed. The problem can be reduced to just: atomically $ replicateM 1000000 (newTVar undefined) or even simpler: replicateM 1000000 (newIORef undefined) Bas