Thanks for the report. The garbage collector is blowing
the C stack, which is why the interpreter is dumping core.

I've tweaked the relevant portions of the GC so as to make
it tail-call friendly (to a C compiler). It makes your example
run out of heap space instead, which is an improvement
on existing behaviour.

--sigbjorn

----- Original Message -----
From: "Iavor Diatchki" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 05, 2001 23:15
Subject: hugs segfaults


> hello,
>
> the following piece of code seems to crash hugs.
>
> ---------------------------------------------------------------
> module Main where
>
> inf = foldl (+) 0 (repeat 1)
>
> main :: IO ()
> main = putStrLn $ show inf
> ---------------------------------------------------------------
>
> here is what happens:
>
> [diatchki@localhost modules]$ hugs -h4M hugsBug.hs
> __   __ __  __  ____   ___      _________________________________________
> ||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
> ||___|| ||__|| ||__||  __||     Copyright (c) 1994-2001
> ||---||         ___||           World Wide Web: http://haskell.org/hugs
> ||   ||                         Report bugs to: [EMAIL PROTECTED]
> ||   || Version: February 2001  _________________________________________
>
> Haskell 98 mode: Restart with command line option -98 to enable extensions
>
> Reading file "/usr/share/hugs/lib/Prelude.hs":
> Reading file "hugsBug.hs":
>
> Hugs session for:
> /usr/share/hugs/lib/Prelude.hs
> hugsBug.hs
> Type :? for help
> Main> main
> Segmentation fault (core dumped)
> [diatchki@localhost modules]$
>
>
> i tried it using the feb 2001 release of hugs on a
> linux machine (mandrake 8.0 distribution).  the machine is
> an athlon 750 with 128Mb of RAM.
>
> bye
> iavor
>
> --
>
+---------------------------------+---------------------------------------+
> |Iavor S. Diatchki                | email: [EMAIL PROTECTED]
|
> |Dept. of Computer Science        | web: http://www.cse.ogi.edu/~diatchki
|
> |Oregon Graduate Institute        | tel: 5037481631
|
>
+---------------------------------+---------------------------------------+
>
> _______________________________________________
> Hugs-Bugs mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/mailman/listinfo/hugs-bugs


_______________________________________________
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to