From ec574b5601cd6fd84fbe81f580726bf681a30118 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Tue, 1 Jul 2003 09:38:07 +0000 Subject: [PATCH] * src/compiler/array-tran.lisp (%check-bound): Fix an off-by-1 error in bounds checking. Observed by Christophe Rhodes on cmucl-imp. --- compiler/array-tran.lisp | 4 ++-- general-info/release-19a.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/array-tran.lisp b/compiler/array-tran.lisp index 586b6cce2..86ed77bfe 100644 --- a/compiler/array-tran.lisp +++ b/compiler/array-tran.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/array-tran.lisp,v 1.33 2003/04/27 11:43:43 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/array-tran.lisp,v 1.34 2003/07/01 09:38:07 gerd Exp $") ;;; ;;; ********************************************************************** ;;; @@ -461,7 +461,7 @@ (unless (constant-continuation-p dimension) (give-up)) (let ((dim (continuation-value dimension))) - `(the (integer 0 ,dim) index))) + `(the (integer 0 (,dim)) index))) ;;; (deftransform %check-bound ((array dimension index) * * :policy (and (> speed safety) (= safety 0))) diff --git a/general-info/release-19a.txt b/general-info/release-19a.txt index 187073d7c..0c0398c85 100644 --- a/general-info/release-19a.txt +++ b/general-info/release-19a.txt @@ -140,6 +140,7 @@ New in this release: made them undisplayable. - Structure predicates no longer signaling an error when applied to obsolete instances. + - A DEFTRANSFORM for array bounds checking had an off-by-1 error. * Other changes: - Removed obsolete alias from MAKE-VECTOR to MAKE-ARRAY -- GitLab