DESCRIBE called with string as second argument mutates that string
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
SBCL 2.0.10 on Linux amd64.
Found by zulu.inuoe.
DESCRIBE, when called with a string as its second argument, sometimes first mutates the string and only then signals a type error.
Example of a type error getting signaled at the beginning:
(let ((str (make-array 256 :element-type 'character :fill-pointer 0)))
(describe 'describe str))
Examples of incorrect behavior:
-------
(describe 'describe (make-array 256 :element-type 'character :fill-pointer 0))
;=> The value
"COMMON-
[symbol]
"
is not of type
STREAM
[Condition of type TYPE-ERROR]
--------------
(defun foo ()
(make-array 256 :element-type 'character :fill-pointer 0))
(let ((str (foo)))
(ignore-errors (describe 'describe str))
(print str))
;=> "COMMON-
[symbol]
"
summary: |
- DESCRIBE called with string argument mutates the string + DESCRIBE called with string as second argument mutates that string |
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |