[comp.sys.xerox] bug

sjc@VAX3.ITI.ORG ("Steven J. Clark") (08/10/89)

I just found an interesting bug in CL:MAKE-ARRAY.  Suppose you do

(SETQ dims '(2 4 6))
(SETQ array (CL:MAKE-ARRAY dims))
(RPLACA dims 1)

What do you suppose (CL:ARRAY-DIMENSIONS array) returns?  Do you think
you'll get an index out of bound error on (CL:AREF array 1 2 3)?

The work-around is pretty obvious:  call (CL:MAKE-ARRAY (APPEND dims)).
Nevertheless, this is very definitely a bug.  I have not investigated
what happens if you destructively modify the list returned by
CL:ARRAY-DIMENSIONS nor if it is EQ to the list you give CL:MAKE-ARRAY,
but I suspect there could be more trouble there as well.

Steve Clark "The happy hacker"