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
(handler-bind ((sb-kernel::binding-stack-exhausted-error #'(lambda (c) (invoke-restart 'abort)))) (foo))
FWIW, that's a subclass of cl:storage-condition on SBCL.