** fix the bug underlying the expected failure in the FORCE-END-OF-FILE
restart on fd-stream decoding errors.
** fix a bug in the ATTEMPT-RESYNC fd-stream decoding restart when the
- error is near the end of file
+ error is near the end of file.
** 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.
* 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
finally (return elements)))
;; Find the smallest character code such that the corresponding
;; byte is != to the code.
- (lowest-non-equivalent-code (position-if-not #'(lambda (pair)
- (apply #'= pair))
- pairs))
+ (lowest-non-equivalent-code
+ (caar (sort (copy-seq exceptions) #'< :key #'car)))
;; Sort them for our lookup table.
(sorted-pairs (sort (subseq pairs lowest-non-equivalent-code)
#'< :key #'car))
,(make-array 256 :element-type t #+nil 'char-code
:initial-contents (loop for byte below 256
collect
- (let ((exception (cadr (assoc byte exceptions))))
+ (let ((exception (cdr (assoc byte exceptions))))
(if exception
- exception
+ (car exception)
byte)))))
(code-to-byte-table
,(make-array (length sorted-lookup-table)
(assert (or (= i (char-code #\?)) (> i 127))))
(t (assert (and (not (= i (char-code #\?))) (< i 128)))))))))
+(with-test (:name (:unibyte-invalid-codepoints :cp857))
+ (dotimes (i 256)
+ (with-open-file (s *test-path* :direction :output :if-exists :supersede :element-type '(unsigned-byte 8))
+ (write-byte i s))
+ (with-open-file (s *test-path* :external-format :cp857)
+ (handler-case (read-char s)
+ (error () (assert (member i '(#xd5 #xe7 #xf2))))
+ (:no-error (char) (assert (not (member i '(#xd5 #xe7 #xf2)))))))))
+
;;;; 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.19"
+"1.0.32.20"