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 = f (f' a b) b f':: Int -> Int -> Int f' a b = 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=996) 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 Gustav Andersson
Hi Gustav, Gustav> Hello, I think I've found a bug in Hugs 98 (February 2001 Gustav> version). Hugs crashes (Stack Overflow) whenever I try to Gustav> execute the following piece of code: Gustav> f a b = f (f' a b) b that's OK. Function f has two bad properties: (1) it loops forever (theoretically) (2) it increases the control stack in each call (at least by the unevaluated closure of (f' a b)) Thus, at some point, the memory reserved for the control stack will be consumed. Cheers Christoph
participants (2)
-
Ch. A. Herrmann -
Gustav Andersson