
Grzegorz schrieb:
Christian Maeder
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.