Hi -- (Sorry, I didn't easily see how to get a CMUCL Trac account; hence this email.)
The CMUCL bug shown below occurs on 64-bit Linux, both Version 20e and the 2014-06 snapshot. http://common-lisp.net/project/cmucl/downloads/release/20e/cmucl-20e-x86-linux.tar.bz2 http://common-lisp.net/project/cmucl/downloads/snapshots/2014/06/cmucl-2014-06-x86-linux.tar.bz2 It appears to be the same bug as this SBCL bug (now fixed for SBCL): https://bugs.launchpad.net/sbcl/+bug/1333327 Here is a log illustrating the bug in the CMUCL versions mentioned above. The expected behavior is shown later below (using SBCL 1.2.1). .......... CMUCL 20e and also 2014-06 snapshot: .......... * (defun read-string-fn (str) (handler-case (let ((acc nil)) (with-input-from-string (stream str) (loop do (let* ((eof-marker (cons nil nil)) (elem (read stream nil eof-marker))) (if (eq elem eof-marker) (loop-finish) (push elem acc))))) (setq acc (nreverse acc)) (values :OK acc)) (error (condition) (return-from read-string-fn (values :ERROR (format nil "~A" condition)))) (storage-condition (condition) (return-from read-string-fn (values :STORAGE (format nil "~A" condition)))))) READ-STRING-FN * (read-string-fn "#\wtf") Error in function LISP::CLOSED-FLAME: #<String-Input Stream> is closed. [Condition of type SIMPLE-ERROR] Restarts: 0: [ABORT] Return to Top-Level. Debug (type H for help) (LISP::CLOSED-FLAME #<String-Input Stream>) Source: Error finding source: Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM: Source file no longer exists: target:code/stream.lisp. 0] .......... Here is the analogous log after defining the function above in SBCL 1.2.1, which I believe is as expected. .......... SBCL 1.2.1 .......... * (read-string-fn "#\wtf") :ERROR "no dispatch function defined for #\\W Stream: #<SB-IMPL::STRING-INPUT-STREAM {1002E27C03}>" * .......... Regards, Matt Kaufmann _______________________________________________ cmucl-help mailing list [email protected] http://lists.zs64.net/mailman/listinfo/cmucl-help
