Subject: Stack overflow problem with CLISP

From: [email-masked]
Date: Tue, 25 Aug 1998 10:09:57 -0400 (EDT)

Hi!

I'm trying to run a DFS routine using CLISP, however, I'm getting the
following error when it tries to print the solution of the DFS:

  The solution is:

  *** - Lisp stack overflow. RESET

If I compile the code then it will work, however, is there another way
to solve this problem?  (i.e. can I increase the stack size somehow).

Thanks,
Brad

P.S. This problem occurs on the Linux and the Solaris versions of CLISP

--------------------------------------------------------------------------
Bradford W. Mott ([email-masked])          Computer Science Department
http://www4.ncsu.edu/~bwmott/www           North Carolina State University
--------------------------------------------------------------------------

---

From: Pierpaolo Bernardi <[email-masked]>
Date: Tue, 25 Aug 1998 16:43:50 +0200 (MET DST)

> to solve this problem?  (i.e. can I increase the stack size somehow).

No, you cannot increase the stack size (without modifying the source of
Clisp and recompiling from scratch, that is).

Why you don't want to compile the code?

Pierpaolo.

---

From: [email-masked]
Date: Wed, 26 Aug 1998 08:58:22 -0400 (EDT)

> Clisp and recompiling from scratch, that is).

Recompiling isn't a problem.  What needs modifying?

> Why you don't want to compile the code?

I'm setting CLISP up for a class and I'd like the stack to be a little
larger so students don't run into the stack overflow problem if they
forget to compile their code :-)

Thanks,
Brad

---

From: Pierpaolo Bernardi <[email-masked]>
Date: Fri, 28 Aug 1998 15:57:34 +0200

From: [email-masked]

On a second thought, maybe increasing the lisp stack size is not a
good idea.  Clisp uses a `lisp stack', and the regular OS stack; with
the current sizes, the lisp stack (usually) overflows before the OS
stack does.  If the size of the lisp stack is increased, then there's
the possibility of the OS stack to overflow first.  An OS stack overflow
causes an uncatchable segfault (i.e. the lisp session is aborted).

Increasing the OS stack size is OS-dependent, and usually is forbidden
to non-root users.

All this may or may not be correct. For an exact analysis, we must
wait for Bruno to come back from its vacation.  8-)

Hope this helps.

Pierpaolo