stack overflow

Ch. A. Herrmann herrmann@infosun.fmi.uni-passau.de
Mon, 14 May 2001 19:39:39 +0200


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