
4 Jun
2007
4 Jun
'07
11:05 a.m.
Hi, I just spent some time trying to find a stack overflow bug. I seem to have narrowed it down to somewhere probably related to the default Binary instances. It only seems to overflow when compiling with -prof. The following is a reasonably minimal example. Any ideas of what might be going on? -- foo.hs -- compiled with: -- ghc -O2 -prof --make foo.hs -- $ ./foo < okok -- Stack space overflow: current size 8388608 bytes. -- Use `+RTS -Ksize' to increase it. import Data.IntMap import qualified Data.ByteString.Lazy as BS import Data.Binary main = do s <- BS.getContents print . size . snd $ (decode $ s::(IntMap Double,IntMap (Int,Maybe String))) -- Grzegorz