From: SourceForge.net <no...@so...> - 2005-06-14 20:53:25
|
Bugs item #1220548, was opened at 2005-06-14 12:36 Message generated for change (Comment added) made by sds You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1220548&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jörg Höhle (hoehle) Assigned to: Nobody/Anonymous (nobody) Summary: unwind-protect confuses abort restart Initial Comment: Hi, I mentioned that in clisp-devel around October 2004 ["confused debugger, aborts to outer break level -- repeatable"], but did not submit a bug report. The bug is still in clisp-cvs. When there's an unwind-protect frame somewhere on the stack, restarts may get confused. As a result, Lisp sessions get mixed up (e.g. today it affected my SLIME session). I originally noticed this with cl-sql, which uses with-foreign-string, which does the same as unwind-protect. [17]> (unwind-protect (error "hi") (print "out")) *** - hi Mögliche Optionen: ABORT :R1 ABORT Break 1 [18]> (unwind-protect (error "hi") (print "out")) *** - hi Mögliche Optionen: ABORT :R1 ABORT ABORT :R2 ABORT Break 2 [19]> abort "out" "out" [20]> Failed Expectation: get out only one level. The :r1 restart does this correctly. In contrast, using the :r1 restarts gets out only one level, as expected. This also happens using the interpreted memory image. Regards, Jörg Höhle ---------------------------------------------------------------------- >Comment By: Sam Steingold (sds) Date: 2005-06-14 16:53 Message: Logged In: YES user_id=5735 when there are several identically named restarts available, one should use the ":R*" command to ensure the right one. if you use the restart name, the first (closest to your current frame) restart is invoked, and it may take you up the stack beyond your other restarts with the same name. see condition.lisp (*active-restarts* &c) ---------------------------------------------------------------------- Comment By: Jörg Höhle (hoehle) Date: 2005-06-14 12:52 Message: Logged In: YES user_id=377168 It seems like the topmost 'abort restart is sometimes skipped, as the following shows: [60]> (with-simple-restart (foo "my foo restart") (print(break))) 1. Trace: (SYSTEM::BREAK-LOOP 'NIL '#<SIMPLE-CONDITION #x2042A01E> 'T) ** - Continuable Error Break Wenn Sie (mit Continue) fortfahren: BREAK-Schleife beenden. Weitere mögliche Optionen: FOO :R1 my foo restart ABORT :R2 ABORT Break 1 [61]> (with-simple-restart (abort "my foo restart") (print(break))) 2. Trace: (SYSTEM::BREAK-LOOP 'NIL '#<SIMPLE-CONDITION #x2042EE46> 'T) ** - Continuable Error Break Wenn Sie (mit Continue) fortfahren: BREAK-Schleife beenden. Weitere mögliche Optionen: ABORT :R1 my foo restart ABORT :R2 ABORT FOO :R3 my foo restart ABORT :R4 ABORT Break 2 [62]> abort Break 1 [61]> abort ; --- this prompt shows that "my foo restart" was not invoked [63]> (with-simple-restart (foo "my foo restart") (print(break))) 1. Trace: (SYSTEM::BREAK-LOOP 'NIL '#<SIMPLE-CONDITION #x204353E6> 'T) ** - Continuable Error Break Wenn Sie (mit Continue) fortfahren: BREAK-Schleife beenden. Weitere mögliche Optionen: FOO :R1 my foo restart ABORT :R2 ABORT Break 1 [64]> foo NIL ; T ; --- here my foo restart was invoked [65]> Maybe this has to do with the ANSI-CL / Paul Dietz' testsuite related change that always supplies an abort restart in the repl? cf. Changelog 2004-02-25? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1220548&group_id=1355 |