SBCL Exhausting control stack

Jason Miller <[email protected]>
Newsgroups gmane.lisp.slime.devel
Message-ID <[email protected]>
SBCL becomes very fragile once the binding stack is exhausted.

SLIME seems to do too much in its default error handling to keep the
image stable when we encounter this error.

Example from the REPL:

;Define a function that will exhaust the stack
(defun foo () (declare (optimize (debug 3) (speed 0))) (foo))
(foo)
; The first run of foo can be aborted, but the second time it will hang
(foo)


A simple workaround would be to wrap any slime invocations with a
handler-bind specifically for this case.

With the same function #'FOO from earlier, we can do this from the REPL
as many times as desired:

(handler-bind ((sb-kernel::binding-stack-exhausted-error
               #'(lambda (c) (invoke-restart 'abort)))) (foo))

Regards,
Jason
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.