can't inspect an adjustable array (sbcl 1.57; Linux x86_64)

Bug #1846191 reported by Yves Pagani
6
This bug affects 1 person
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-200.fc30.x86_64 #1 SMP Mon Sep 23 13:42:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

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:BOUNDING-INDICES-BAD-ERROR in thread
#<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-OUT-OF-BOUNDS:IS-AN-ERROR

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

(SB-KERNEL:VECTOR-SUBSEQ* #<unavailable argument> #<unavailable argument> #<unavailable argument>)

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!

Revision history for this message
Stas Boukarev (stassats) wrote :

b99f236c65177bf20aba278ebc29308af4a2a5ac

Changed in sbcl:
status: New → Fix Committed
Revision history for this message
Yves Pagani (brundleti) wrote :

I tried the patch and it solved the problem.

Thanks for your super-quick fix.

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.