[armedbear-devel] Serious bug involving UWP
Tobias C. Rittweiler
tcr at freebits.de
Thu Sep 17 20:36:52 UTC 2009
"Tobias C. Rittweiler" writes:
> Steps to reproduce:
>
> * ABCL from svn, updated a few minutes ago.
>
> * Slime from CVS.
>
> * M-x slime-scratch
>
> * Put (defun test (x) ,bar) in the buffer
>
> * Press C-c C-c
>
> You'll see "Evaluation aborted." in the minibuffer even though the
> debugger should have popped up complaining about comma not being inside
> backquote.
>
> C-c C-c is SWANK-COMPILE-STRING in swank-abcl.lisp.
>
> If you follow the control flow, you'll see that in SLDB-LOOP (we come
> here through *DEBUGGER-HOOK*) in swank.lisp,
>
> __the UNWINDED-PROTECT's protected form is *never* executed and it goes
> straight to the cleanup forms.__
Ok, I found the root of the issue: The java code behind
SYS:FRAME-TO-STRING created conses whose CAR ptr is NULL. The printer
will barf on such things, of course.
A patch which fixes this issue is attached.
There is another issue I'd like to raise.
The reason for the funny behaviour, and why it consumed a lot of
time to track this bug down is because there's no global handler
which prints a Stack Trace for uncaught Exceptions.
Instead of such a global handler, local "catch (...) { Debug.Trace
... }" are sprinkled all over the code base. And, obviously, they're
easy to miss---as it has been the case here.
So the exception is swept under the carpet and ABCL seems to unwind
the stack to some safe point, probably the toplevel, and proceed
from there.
-T.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lisp-stack-frames-handle-unavailable-args.diff
Type: text/x-diff
Size: 3892 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20090917/c30b1ee4/attachment.diff>
More information about the armedbear-devel
mailing list