adjust-array ignores :initial-element

Bug #1096359 reported by Jan Moringen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
High
Unassigned

Bug Description

1. A description of what you do, what happens, and what you expected to happen.

  sbcl --no-userinit
  This is SBCL 1.1.3, an implementation of ANSI Common Lisp.
  More information about SBCL is available at <http://www.sbcl.org/>.

  SBCL is free software, provided as is, with absolutely no warranty.
  It is mostly in the public domain; some portions are provided under
  BSD-style licenses. See the CREDITS and COPYING files in the
  distribution for more information.
  * (let ((a (make-array 1
        :adjustable nil
        :fill-pointer nil
        :initial-element :a)))
        (adjust-array a 2 :initial-element :b))

  #(:A 0)
  *

Expected: #(:A :B). Compare to 1.0.57:

  /usr/bin/sbcl --no-userinit
  This is SBCL 1.0.57.0.debian, an implementation of ANSI Common Lisp.
  More information about SBCL is available at <http://www.sbcl.org/>.

  SBCL is free software, provided as is, with absolutely no warranty.
  It is mostly in the public domain; some portions are provided under
  BSD-style licenses. See the CREDITS and COPYING files in the
  distribution for more information.
  * (let ((a (make-array 1
        :adjustable nil
        :fill-pointer nil
        :initial-element :a)))
        (adjust-array a 2 :initial-element :b))

  #(:A :B)
  *

2. SBCL version as reported by "sbcl --version"

See above.

3. Output from uname -a.

Linux ferberit 3.5.0-19-generic #30-Ubuntu SMP Tue Nov 13 17:49:53 UTC 2012 i686 i686 i686 GNU/Linux

4. *FEATURES*.

1.1.3:
(:ALIEN-CALLBACKS :ANSI-CL :C-STACK-IS-CONTROL-STACK :COMMON-LISP
 :COMPARE-AND-SWAP-VOPS :CYCLE-COUNTER :ELF :GENCGC :IEEE-FLOATING-POINT
 :INLINE-CONSTANTS :LARGEFILE :LINKAGE-TABLE :LINUX :LITTLE-ENDIAN
 :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS :OS-PROVIDES-BLKSIZE-T
 :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN :OS-PROVIDES-GETPROTOBY-R
 :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC :OS-PROVIDES-SUSECONDS-T
 :RAW-INSTANCE-INIT-VOPS :SB-CORE-COMPRESSION :SB-DOC :SB-EVAL :SB-FUTEX
 :SB-LDB :SB-PACKAGE-LOCKS :SB-SOURCE-LOCATIONS :SB-TEST :SB-THREAD :SB-UNICODE
 :SBCL :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-FIXED-OBJECTS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-VECTORS
 :STACK-GROWS-DOWNWARD-NOT-UPWARD :UNIX :UNWIND-TO-FRAME-AND-CALL-VOP :X86)
1.0.57:
(:X86 :UNIX :ELF :LINUX :LARGEFILE :GENCGC :STACK-GROWS-DOWNWARD-NOT-UPWARD
 :C-STACK-IS-CONTROL-STACK :COMPARE-AND-SWAP-VOPS :UNWIND-TO-FRAME-AND-CALL-VOP
 :RAW-INSTANCE-INIT-VOPS :STACK-ALLOCATABLE-CLOSURES :STACK-ALLOCATABLE-VECTORS
 :STACK-ALLOCATABLE-LISTS :STACK-ALLOCATABLE-FIXED-OBJECTS :ALIEN-CALLBACKS
 :CYCLE-COUNTER :INLINE-CONSTANTS :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS
 :LINKAGE-TABLE :LITTLE-ENDIAN :OS-PROVIDES-DLOPEN :OS-PROVIDES-DLADDR
 :OS-PROVIDES-PUTWC :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-SUSECONDS-T
 :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL :IEEE-FLOATING-POINT
 :SB-SOURCE-LOCATIONS :SB-EVAL :SB-UNICODE :SB-PACKAGE-LOCKS :SB-LDB :SB-TEST
 :SB-DOC :SBCL :COMMON-LISP :ANSI-CL :SB-CORE-COMPRESSION :SB-THREAD :SB-FUTEX)

Tags: regression
Revision history for this message
Jan Moringen (scymtym) wrote :

One more data point:

  sbcl --no-userinit
  This is SBCL 1.1.2, an implementation of ANSI Common Lisp.
  More information about SBCL is available at <http://www.sbcl.org/>.

  SBCL is free software, provided as is, with absolutely no warranty.
  It is mostly in the public domain; some portions are provided under
  BSD-style licenses. See the CREDITS and COPYING files in the
  distribution for more information.
  * (let ((a (make-array 1
        :adjustable nil
        :fill-pointer nil
        :initial-element :a)))
        (adjust-array a 2 :initial-element :b))

  #(:A :B)
  * *features*
  (:ALIEN-CALLBACKS :ANSI-CL :C-STACK-IS-CONTROL-STACK :COMMON-LISP
   :COMPARE-AND-SWAP-VOPS :COMPLEX-FLOAT-VOPS :CYCLE-COUNTER :ELF :FLOAT-EQL-VOPS
   :GENCGC :IEEE-FLOATING-POINT :INLINE-CONSTANTS :LARGEFILE :LINKAGE-TABLE
   :LINUX :LITTLE-ENDIAN :MEMORY-BARRIER-VOPS :MULTIPLY-HIGH-VOPS
   :OS-PROVIDES-BLKSIZE-T :OS-PROVIDES-DLADDR :OS-PROVIDES-DLOPEN
   :OS-PROVIDES-GETPROTOBY-R :OS-PROVIDES-POLL :OS-PROVIDES-PUTWC
   :OS-PROVIDES-SUSECONDS-T :RAW-INSTANCE-INIT-VOPS :SB-CORE-COMPRESSION :SB-DOC
   :SB-EVAL :SB-FUTEX :SB-LDB :SB-PACKAGE-LOCKS :SB-SOURCE-LOCATIONS :SB-TEST
   :SB-THREAD :SB-UNICODE :SBCL :STACK-ALLOCATABLE-CLOSURES
   :STACK-ALLOCATABLE-FIXED-OBJECTS :STACK-ALLOCATABLE-LISTS
   :STACK-ALLOCATABLE-VECTORS :STACK-GROWS-DOWNWARD-NOT-UPWARD :UNIX
   :UNWIND-TO-FRAME-AND-CALL-VOP :X86-64)

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Stas Boukarev (stassats)
Revision history for this message
Stas Boukarev (stassats) wrote :

commit bab82fcf13993d008a4751cc143bde298613c22a
Author: Stas Boukarev <email address hidden>
Date: Sat Jan 5 19:43:05 2013 +0400

    adjust-array: Make sure that :initial-element is used.

    Adjust-array ignored :initial-element for arrays of type T.

Changed in sbcl:
status: Confirmed → Fix Committed
assignee: Stas Boukarev (stassats) → nobody
Changed in sbcl:
status: Fix Committed → 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.