> Attached are two programs, both of which are supposed to
> print a string.
>
> Long.hs looks fairly simple to me. However when compiled with
> ghc -O2, I get a segmentation fault:
> > ghc Long.hs -o long -O2
> > ./long
> > Segmentation Fault
> With ghc -O or ghc it works. I suppose this is probably a memory
> problem so if you can't reproduce it try replacing 200 by something a
> little higher.
>
> ABC.hs is a little more complicated (it generates an infinite string
> of ABCs containing no consecutive equal sequences). Whatever I do
> (ghc, ghc -O or ghc -O2) it falls over with:
>
> Fail: resource exhausted
> Action: writeChunks
> Reason: insufficient resources
>
> after printing a measly 9216 characters. Maybe I deserve this, but I
> think the message could be a little more helpful.
This one is probably fixed by the commit I made last thing Friday;
non-blocking writes weren't happening properly. I'll take a look at your
other problem on Monday - I assume this is a ghc built from recently
checked-out CVS sources? If so, what date?
Cheers,
Simon