> As far as I can tell, there aren't any user-level symptoms of this,
> are there? In other words, I can't construct a test case using
> portable code... I suppose that's why the bug has escaped detection.
> Out of interest, how did you find it?
Through being a loser who can't keep away from obscurities! :)
A weaker argument is that if you peek-char or unread-char on the
concatenated stream, because current stream isn't updated correctly
when searching for a char to read from, you may end up trying to
unread on the wrong stream. If said stream is a string stream, say,
the unread tries to push the stream index back, but since it was zero,
we get a negative number as an index, which signals the type error:
* (with-input-from-string (p "")
(with-input-from-string (q "foo")
(let ((s (make-concatenated-stream p q)))
(peek-char nil s))))
debugger invoked on condition of type TYPE-ERROR:
The value -1 is not of type (MOD 536870911).
Sorry if this was a better test case!
Thanks for taking a look at this one,