Fix an off-by-one in MAP-ALLOCATED-OBJECTS
authorPaul Khuong <pvk@pvk.ca>
Sat, 2 Jul 2011 23:59:54 +0000 (19:59 -0400)
committerPaul Khuong <pvk@pvk.ca>
Sun, 3 Jul 2011 00:03:24 +0000 (20:03 -0400)
 The bug would be extremely hard to tickle with current gencgc, but
 that's going to change soon.

NEWS
src/code/room.lisp

diff --git a/NEWS b/NEWS
index 42ccd76..1df6936 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,8 @@ changes relative to sbcl-1.0.49:
     functions with both optional and key argments.
   * bug fix: regalloc doesn't barf on unused TNs due to type-directed constant
     folding. (lp#729765)
+  * bug fix: Fixed an off-by-one in MAP-ALLOCATED-OBJECTS that might have caused
+    infinite loops.
 
 changes in sbcl-1.0.49 relative to sbcl-1.0.48:
   * minor incompatible change: WITH-LOCKED-HASH-TABLE no longer disables
index ec6888e..2f3c02a 100644 (file)
                                  ;; pointer is still below the allocation offset
                                  ;; of the page
                                  (when (and (not (zerop alloc-flag))
-                                            (<= (logand page-mask addr)
-                                                bytes-used))
+                                            (< (logand page-mask addr)
+                                               bytes-used))
                                    ;; Don't bother testing again until we
                                    ;; get past that allocation offset
                                    (setf skip-tests-until-addr