1.0.21.31: fix bad PROGV and RESTRICT-COMPILER-POLICY interaction
authorNikodemus Siivola <nikodemus@random-state.net>
Sat, 18 Oct 2008 15:26:06 +0000 (15:26 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Sat, 18 Oct 2008 15:26:06 +0000 (15:26 +0000)
 * Reported by Matthias Andreas Benkard Matthias Andreas Benkard.

 * Patch by Juho Snellman.

NEWS
src/compiler/ir2tran.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 27ca910..33888b7 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,9 @@ changes in sbcl-1.0.22 relative to 1.0.21:
     update the system's knowledge about its call signature properly.
   * bug fix: fixed #431; incompatible alien record type redefinitions
     are detected and handled. (reported by Neil Haven)
+  * bug fix: using RESTRICT-COMPILER-POLICY with DEBUG 3 could cause
+    PROGV miscompilation. (reported by Matthias Benkard, patch by Juho
+    Snellman)
 
 changes in sbcl-1.0.21 relative to 1.0.20:
   * new feature: the compiler is able to track the effective type of a
index ca486d1..b19e6fa 100644 (file)
                               (about-to-modify-symbol-value var "bind ~S")
                               (%primitive bind unbound-marker var))))
                         (,bind (vars vals)
-                          (declare (optimize (speed 2) (debug 0)))
+                          (declare (optimize (speed 2) (debug 0)
+                                             (insert-debug-catch 0)))
                           (cond ((null vars))
                                 ((null vals) (,unbind vars))
                                 (t
index 6f48dad..34aa2a0 100644 (file)
 (with-test (:name :hairy-function-name)
   (assert (eq 'read-line (nth-value 2 (function-lambda-expression #'read-line))))
   (assert (equal "#<FUNCTION READ-LINE>" (princ-to-string #'read-line))))
+
+;;; PROGV + RESTRICT-COMPILER-POLICY
+(with-test (:name :progv-and-restrict-compiler-policy)
+  (let ((sb-c::*policy-restrictions* sb-c::*policy-restrictions*))
+    (restrict-compiler-policy 'debug 3)
+    (let ((fun (compile nil '(lambda (x)
+                              (let ((i x))
+                                (declare (special i))
+                                (list i
+                                      (progv '(i) (list (+ i 1))
+                                        i)
+                                      i))))))
+      (assert (equal '(1 2 1) (funcall fun 1))))))
index 1bc3c9f..6f12975 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.21.30"
+"1.0.21.31"