From: Nathan Froyd Date: Thu, 9 Sep 2004 20:50:11 +0000 (+0000) Subject: 0.8.14.6: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=d406d3a2345fe475fa7cb27b516d023cc2f7225e;p=sbcl.git 0.8.14.6: Oops. Fix dumping of specialized arrays whose elements are smaller than a single byte. Now with added tests! Passes all tests. --- diff --git a/src/compiler/dump.lisp b/src/compiler/dump.lisp index ed4c7b1..2609d28 100644 --- a/src/compiler/dump.lisp +++ b/src/compiler/dump.lisp @@ -827,7 +827,7 @@ ((simple-array nil (*)) (dump-unsigned-vector 0 0)) (simple-bit-vector - (dump-unsigned-vector 1 (ceiling len 8))) + (dump-unsigned-vector 1 (ceiling len 8))) ; bits to bytes ;; KLUDGE: This isn't the best way of expressing that the host ;; may not have specializations for (unsigned-byte 2) and ;; (unsigned-byte 4), which means that these types are @@ -837,10 +837,10 @@ ;; CSR, 2002-05-07 #-sb-xc-host ((simple-array (unsigned-byte 2) (*)) - (dump-unsigned-vector 2 (ceiling len 8))) + (dump-unsigned-vector 2 (ceiling (ash len 1) 8))) ; bits to bytes #-sb-xc-host ((simple-array (unsigned-byte 4) (*)) - (dump-unsigned-vector 4 (ceiling len 8))) + (dump-unsigned-vector 4 (ceiling (ash len 2) 8))) ; bits to bytes #-sb-xc-host ((simple-array (unsigned-byte 7) (*)) (dump-unsigned-vector 7 len)) diff --git a/tests/dump.impure-cload.lisp b/tests/dump.impure-cload.lisp index 2b1ad11..f4def0c 100644 --- a/tests/dump.impure-cload.lisp +++ b/tests/dump.impure-cload.lisp @@ -90,4 +90,12 @@ (assert (eql (savable-structure-d *savable-structure*) 39)) (assert (eql (savable-structure-e *savable-structure*) 19)) +;;; ensure that we can dump and reload specialized arrays whose element +;;; size is smaller than a byte (caused a few problems circa SBCL +;;; 0.8.14.4) + +(defvar *1-bit* (make-array 5 :element-type 'bit :initial-element 0)) +(defvar *2-bit* (make-array 5 :element-type '(unsigned-byte 2) :initial-element 0)) +(defvar *4-bit* (make-array 5 :element-type '(unsigned-byte 4) :initial-element 1)) + (sb-ext:quit :unix-status 104) ; success diff --git a/version.lisp-expr b/version.lisp-expr index e16c51c..cc36f22 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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".) -"0.8.14.5" +"0.8.14.6"