[prev in list] [next in list] [prev in thread] [next in thread]
List: sbcl-commits
Subject: [Sbcl-commits] CVS: sbcl/tests condition.impure.lisp,1.9,1.10
From: Nikodemus Siivola <demoss () users ! sourceforge ! net>
Date: 2008-07-30 13:53:14
Message-ID: E1KOC78-0003v8-RO () sc8-pr-cvs8 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/sbcl/sbcl/tests
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15043/tests
Modified Files:
condition.impure.lisp
Log Message:
1.0.19.4: recursive restart computation
* A call to COMPUTE-RESTARTS from restart test function caused
infinite recursion. Fix with a stack.
* Test-case.
Index: condition.impure.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/condition.impure.lisp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- condition.impure.lisp 26 Oct 2007 12:48:14 -0000 1.9
+++ condition.impure.lisp 30 Jul 2008 13:53:12 -0000 1.10
@@ -108,3 +108,16 @@
;; whether escaped or not
(dolist (*print-escape* '(nil t))
(write c :stream (make-string-output-stream)))))
+
+;;; Reported by Michael Weber: restart computation in :TEST-FUNCTION used to
+;;; cause infinite recursion.
+(defun restart-test-finds-restarts ()
+ (restart-bind
+ ((bar (lambda ()
+ (return-from restart-test-finds-restarts 42))
+ :test-function
+ (lambda (condition)
+ (find-restart 'qux))))
+ (when (find-restart 'bar)
+ (invoke-restart 'bar))))
+(assert (not (restart-test-finds-restarts)))
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sbcl-commits mailing list
Sbcl-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic