Incorrect values computed for literal array with fill-pointer 1 in compiled code

Bug #2032999 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

(defun bug222 ()
  (let* ((a (make-array '(10) :element-type '(unsigned-byte 62)
                              :fill-pointer 1
                              :initial-contents '(4 8 10 20 25 35 76 89 100 203)
                              ))
         (lam `(lambda (i) (aref ,a i)))
         (fn (compile nil lam)))
    (values (loop for i from 0 below 10
                  collect (aref a i))
            (loop for i from 0 below 10
                  collect (funcall fn i)))))

(bug222) ==>

(4 8 10 20 25 35 76 89 100 203)
(4 4 4 4 4 4 4 4 4 4)

This bug does not occur if the fill-pointer is instead initialized to 2.

x86-64, "2.3.7.147-e4b270bb5"

description: updated
Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.