Stack overflow with Data.Binary
grzegorz.chrupala at computing.dcu.ie
Mon Jun 4 11:05:56 EDT 2007
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?
-- compiled with:
-- ghc -O2 -prof --make foo.hs
-- $ ./foo < okok
-- Stack space overflow: current size 8388608 bytes.
-- Use `+RTS -Ksize' to increase it.
import qualified Data.ByteString.Lazy as BS
main = do
s <- BS.getContents
print . size . snd $ (decode $ s::(IntMap Double,IntMap (Int,Maybe String)))
More information about the Libraries