Stack overflow with Data.Binary
Christian Maeder
maeder at tzi.de
Mon Jun 4 12:49:41 EDT 2007
Grzegorz schrieb:
> Christian Maeder <maeder <at> tzi.de> writes:
>> I've tried your code with ghc-6.6.1 under x86 linux with binary-0.3:
>> http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary-0.3
>>
>> It does terminate for me with and without profiling and/or optimization,
It does _not_ terminate!!! (oops)
>> when I pass in the source file itself as input:
>>
>> $ ./foo < foo.hs
[..]
> I don't know what's supposed to happen if you pass it
> invalid input (such as the source file); for me it it
> seems to just eat up all available memory.
Yes, same on my machine.
> However, I observed the stack overflow when actually
> passing in *valid* input,that is a tuple of two IntMaps
> previously serialized using Binary. If that
> helps I copied the input file I used here: http://computing.dcu.ie/~gchrupala/okok
I can confirm your observation with this file, too.
C.
$ ghc --make -O2 foo.hs
[1 of 1] Compiling Main ( foo.hs, foo.o )
Linking foo ...
$ ./foo < okok
58386
$ ghc --make -O2 -prof -auto-all foo.hs
[1 of 1] Compiling Main ( foo.hs, foo.o )
Linking foo ...
$ ./foo < okok
Stack space overflow: current size 8388608 bytes.
Use `+RTS -Ksize' to increase it.
More information about the Libraries
mailing list