Fix %concatenate-to-vector

This commit is contained in:
Douglas Katzman 2021-07-07 12:00:44 -04:00
parent af6abcaf16
commit 70b20e891b
2 changed files with 9 additions and 4 deletions

View file

@ -1169,8 +1169,9 @@ many elements are copied."
(declare (index length))
(do-rest-arg ((seq) sequences)
(incf length (length seq)))
(let ((result (sb-vm::allocate-vector-with-widetag #+ubsan nil
widetag length nil))
(let* ((n-bits-shift (aref sb-vm::%%simple-array-n-bits-shifts%% widetag))
(result (sb-vm::allocate-vector-with-widetag
#+ubsan nil widetag length n-bits-shift))
(setter (the function (svref %%data-vector-setters%% widetag)))
(index 0))
(declare (index index))

View file

@ -69,3 +69,7 @@
(setf (fill-pointer x) 0)))
(make-array 2 :adjustable t))
type-error))
(with-test (:name :concatenate-to-vector)
(assert (sb-kernel:%concatenate-to-vector sb-vm:simple-bit-vector-widetag
'(1 1) '(1 0))))