[Slime-devel] SBCL Exhausting control stack
Jason Miller
jason at milr.com
Tue Jun 17 20:34:55 UTC 2014
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
More information about the slime-devel
mailing list