[Slime-devel] SBCL Exhausting control stack

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. -- • attila lendvai • PGP: 963F 5D5F 45C7 DFCD 0A39 -- “You only have power over people as long as you don't take everything away from them. But when you've robbed a man of everything he's no longer in your power ― he's free again.” — Aleksandr Solzhenitsyn (1918–2008)
participants (2)
-
Attila Lendvai
-
Jason Miller