It's possible that the following bug (if it is one) would only ever be
found by someone trying to reverse-engineer the error reporting of
PEEK-CHAR, but in any case...
If you simply enter (PEEK-CHAR 12) at the REPL, then type 'x' and hit
Enter after that, you get (with sbcl 0.8.7):
debugger invoked on a SB-INT:BUG in thread 9973:
Impossible case reached in PEEK-CHAR
This is probably a bug in SBCL itself. (Alternatively, SBCL might have been
corrupted by bad user code, e.g. by an undefined Lisp operation like
(FMAKUNBOUND 'COMPILE), or by stray pointers from alien code or from unsafe
Lisp code; or there might be a bug in the OS or hardware that SBCL is running
on.) If it seems to be a bug in SBCL itself, the maintainers would like to
know about it. Bug reports are welcome on the SBCL mailing lists, which you
can find at <http://sbcl.sourceforge.net/>.
You can type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT ] Reduce debugger level (leaving debugger, returning to toplevel).
1: [TOPLEVEL] Restart at toplevel READ/EVAL/PRINT loop.
(SB-INT:BUG 1 "Impossible case reached in PEEK-CHAR")[:EXTERNAL]
12 is, of course, an illegal peek-type. ACL (for example) reports this
error immediately after (PEEK-CHAR 12), without waiting for the user to
type 'x' and hit Enter.