[nhc-bugs] A bug

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Mon, 11 Jun 2001 11:35:32 +0100


> main = mapM_ putStrLn [ "echo " ++ show x ++ " | a.out " | x <- [1..]]

> hPutStr: internal error, not a cons-list!
> hPutStr:   got CONSTRW src=0x401cc80c size=1
> hPutStr:     char=''

Yes, this bug appears to be present in 1.06 as well.  If you change
the runtime heapsize, it sometimes manifests as a segmentation fault,
other times as a (correct) out-of-heap error.  This suggests a garbage
collector problem.

I also have a couple of other example programs displaying odd behaviour
of this nature.  As a workaround, you can set the heapsize to one
which appears to work.  Unfortunately, you'll have to do that by trial
and error - for some programs a smaller heap is best, for others,
a larger heap.

Meanwhile, I'm searching for a proper fix.

Regards,
    Malcolm