Hi,
what version of ghc did you compile your program with? Based on your
stack size setting, I'm guessing ghc-2.10 :-) Since then, List.sort
has been speeded up quite a bit (i.e., we're not using the sample
implementation in the Prelude any longer), and I'm unable to reproduce
your problem with ghc-3.02 (or ghc-3.03).
If you don't want to upgrade ghc right now, I can compile up your code
on a local linux box, if you like.
--Sigbjorn
Oege de Moor writes:
> The program below is compiled on an i386 under Linux,
> and invoked:
>
> test +RTS -K10m
> braga.tex (a file of about 20K)
>
> this gives a segmentation fault
>
> test +RTS -K10m -H20m
> braga.tex
>
> works fine. It also works fine when compiled under Solaris on a Sun Sparc.
> It would appear, therefore, that there is a problem with garbage collection
> under linux. Is this a Known Problem with a Known Work-around?
>
> I am lecturing at next week's Summer School on Advanced Functional Programming,
> and had hoped to produce a binary with ghc for students to play with. All
> was developed under Solaris, and I naively assumed it would work under Linux
> without any ado...
>
> A swift response would be much appreciated!
>
> ------------------------------------------------------------------------------
>
> module Main (main) where
>
> import List
>
> main = do putStr "test\n"
> putStr "type input file name: "
> filename <- getLine
> input <- readFile filename
> putStr (sort input)