can't inspect an adjustable array (sbcl 1.57; Linux x86_64)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hello,
I'm learning Common Lisp and I wanted to inspect an adjustable vector but i got errors when inspecting from a terminal (in Emacs + sly inspection worked). By trying/compiling older versions of sbcl, it appears that the last tagged version which worked was 1.5.4 and the 1.5.5 already has this error. (i tried with and without the --fancy argument and results were the same in both cases)
The sbcl's version: sbcl --version : SBCL 1.5.7.19-e7ab482bf
Compiled using : ./make-sh --fancy
Done on: uname -a : Linux ypwork 5.2.17-
The example I used is the following:
(defparameter *x* (make-array 3 :fill-pointer 0 :adjustable t))
(vector-push 'a *x*)
(vector-push 'b *x*)
(vector-push 'c *x*)
(vector-push-extend 4 *x*)
(inspect *x*)
I got :
debugger invoked on a SB-KERNEL:
#<THREAD "main thread" RUNNING {10005604C3}>:
The bounding indices 0 and 6 are bad for a sequence of length 4.
See also:
The ANSI Standard, Glossary entry for "bounding index designator"
The ANSI Standard, writeup for Issue SUBSEQ-
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-
0: [ABORT] Exit debugger, returning to top level.
(SB-KERNEL:
It should be noticed that the Fedora's packaged version works as expected:
sbcl --version: SBCL 1.4.14-2.fc30
(defparameter *x* (make-array 3 :fill-pointer 0 :adjustable t))
(vector-push 'a *x*)
(vector-push 'b *x*)
(vector-push 'c *x*)
(vector-push-extend 4 *x*)
(inspect *x*)
The object is a VECTOR of length 4.
0. A
1. B
2. C
3. 4
I also tried this small example with clisp and ecl (both from the Fedora's repo) and they returned the expected values.
Thanks to all for the great work you put to this fantastic compiler!
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
b99f236c65177bf 20aba278ebc2930 8af4a2a5ac