stack overflow

Gustav Andersson e8gus@etek.chalmers.se
Mon, 14 May 2001 19:15:56 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_006A_01C0DCAA.4D4F0830
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,
I think I've found a bug in Hugs 98 (February 2001 version). Hugs =
crashes (Stack Overflow) whenever I try to execute the following piece =
of code (well I know, the code is not very useful, it came from a typo): =


----------------------
f :: Int -> Int -> Int
f a b =3D f (f' a b) b

f':: Int -> Int -> Int
f' a b =3D a+b
----------------------

Then i Hugs execute f with two arbitary integers
ex.
> f 2 2

Hugs Version February 2001 will crash with the following error (piece =
from drwatson's log-file in Windows 2000).
Application exception occurred:
        App:  (pid=3D996)
        When: 2001-05-14 @ 19:01:03.010
        Exception number: c00000fd (stack overflow)

I've also tried the program under hugs in unix (I don't know the =
version, it didn't have the function ":version")
Stack overflow: pid 9856, proc hugs, addr 0x11fdfffe0, pc 0x12001c124
Segmentation fault

I hope this will help you with the next version of hugs.

Yours Sincerly=20
Gustav Andersson

------=_NextPart_000_006A_01C0DCAA.4D4F0830
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I think I've found a bug in Hugs 98 =
(February 2001=20
version). Hugs crashes (Stack Overflow) whenever I try to execute the =
following=20
piece of code (well I know, the code is not very useful, it came from a =
typo):=20
</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>
<DIV><FONT face=3DCourier size=3D2>----------------------</FONT></DIV>
<DIV></FONT><FONT face=3DCourier size=3D2>f :: Int -&gt; Int -&gt;=20
Int<BR></FONT><FONT face=3DCourier size=3D2>f a b =3D f (f' a b) =
b</FONT></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DCourier size=3D2>f':: Int -&gt; Int -&gt; Int<BR>f' a =
b =3D=20
a+b</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2><FONT face=3DCourier=20
size=3D2>----------------------</FONT><BR></DIV></FONT>
<DIV><FONT face=3DArial size=3D2>Then i Hugs execute f with two arbitary =

integers</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>ex.</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2>&gt; f 2 2</FONT></DIV>
<DIV><FONT face=3DCourier size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2><FONT face=3DArial>Hugs Version February 2001 will =
crash with=20
the following error (piece from drwatson's log-file in Windows=20
2000).</FONT></DIV></FONT>
<DIV><FONT face=3DCourier size=3D2>Application exception=20
occurred:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; App:&nbsp;=20
(pid=3D996)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; When: =
2001-05-14 @=20
19:01:03.010<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exception =
number:=20
c00000fd (stack overflow)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I've also tried the program under hugs =
in unix (I=20
don't know the version, it didn't have the function =
":version")</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>
<DIV><FONT face=3DCourier size=3D2>Stack overflow: pid 9856, proc hugs, =
addr=20
0x11fdfffe0, pc 0x12001c124<BR>Segmentation fault</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>I hope this will help you with the next version of hugs.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Yours Sincerly </DIV>
<DIV>Gustav Andersson</DIV></FONT></DIV></BODY></HTML>

------=_NextPart_000_006A_01C0DCAA.4D4F0830--