external format the system supports, it is now possible to specify
(:<encoding> :replacement <character>) as an external format which will
automatically substitute <character> on encoding or decoding errors for
- streams and for STRING-TO-OCTETS and its inverse.
+ streams and for STRING-TO-OCTETS and its inverse. (launchpad bug
+ #317072)
** improvement: the file streams underlying the standard streams (such as
*STANDARD-INPUT*, *TERMINAL-IO*) are opened with an external format
which uses the replacement mechanism to handle encoding errors,
** fix a double-error case in unibyte octet conversions, when the first
use of USE-VALUE is ignored.
** fix bugs in handling of undefined code points in unibyte encodings.
+ ** fix LISTEN (and consequent hangs in READ-CHAR-NO-HANG) on bivalent
+ streams after an UNREAD-CHAR.
* enhancement: SB-INTROSPECT:ALLOCATION-INFORMATION also reports if the
object is allocated in a boxed region of dynamic space.
* bug fix: uses of slot accessors on specialized method parameters within
the cross-compiler without warnings. (thanks to Josh Elasser; launchpad
bug #396597)
* bug fix: correctly dump literal objects in defaulting forms of arglists.
+ (reported by Attila Lendvai; launchpad bug #310132)
changes in sbcl-1.0.32 relative to sbcl-1.0.31:
* optimization: faster FIND and POSITION on strings of unknown element type
(setf (aref buffer (+ start total-copied)) (vector-pop instead))
(incf total-copied)
(when (= requested total-copied)
+ (when (= (fill-pointer instead) 0)
+ (setf (fd-stream-listen stream) nil))
(return-from ,in-function total-copied)))
(do ()
(nil)
(do-listen)))
(:unread
(decf (buffer-head (fd-stream-ibuf fd-stream))
- (fd-stream-character-size fd-stream arg1))
- (setf (fd-stream-listen fd-stream) t))
+ (fd-stream-character-size fd-stream arg1)))
(:close
;; Drop input buffers
(setf (ansi-stream-in-index fd-stream) +ansi-stream-in-buffer-length+
(assert (equal "still open" (read-line f)))))
(assert (not (probe-file "delete-file-on-stream-test.tmp"))))
\f
+;;; READ-CHAR-NO-HANG on bivalent streams (as returned by RUN-PROGRAM)
+;;; was wrong. CSR managed to promote the wrongness to all streams in
+;;; the 1.0.32.x series, breaking slime instantly.
+(with-test (:name :read-char-no-hang-after-unread-char)
+ (let* ((process (run-program "/bin/sh" '("-c" "echo a && sleep 10")
+ :output :stream :wait nil))
+ (stream (process-output process))
+ (char (read-char stream)))
+ (assert (char= char #\a))
+ (unread-char char stream)
+ (assert (char= (read-char stream) #\a))
+ (assert (char= (read-char stream) #\Newline))
+ (let ((time (get-universal-time)))
+ ;; no input, not yet known to be at EOF: should return
+ ;; immediately
+ (read-char-no-hang stream)
+ (assert (< (- (get-universal-time) time) 2)))))
+
;;; success
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.32.27"
+"1.0.32.28"