Stack overflow weirdness

Simon Marlow marlowsd at
Fri Jan 28 11:40:33 CET 2011

On 27/01/2011 11:45, Daniel Fischer wrote:
> While tuning some code, the test programme suddenly started producing stack
> overflows.
> Reverting the code to a previous version did not revert that behaviour,
> code that previously produced a well-behaved binary now produced stack
> overflowing ones.
> But only with ghc-7.0.1, not with ghc-6.12.3 and ghc-6.12.1, and when
> compiled with optimisations (both, -O and -O2) and without profiling.
> A HEAD from October and a freshly darcs pulled HEAD displayed the same
> behaviour as 7.0.1.
> At some point I tried compiling with -fno-strictness (+ -O or -O2) which
> again produced well-behaved albeit somewhat slower binaries.
> An hour or so later, I again compile with -O2 without -fno-strictness to
> see whether the Core revealed something and, as suddenly as the stack
> overflows started, they disappeared, for the time being, I consistently get
> well-behaved binaries.
> A run of an overflowing binary with -hT -K32M produced a triangular graph
> with>  10MB Blackhole allocation and>  30MB TSO allocation in the peak.
> Obviously the behaviour is not reproducible, nevertheless, perhaps somebody
> has an idea what went on. Or should I attribute it to cosmic rays?

I think you may have had an encounter with this bug:

I reported it yesterday, and Simon has already fixed it.  The fix will 
be in 7.0.2.


More information about the Glasgow-haskell-users mailing list