| Paste number 34535: | slime/sbcl bugs |
| Pasted by: | adeht |
| When: | 2 years, 5 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+QNB |
| Channel: | #lisp |
| Paste contents: |
;;;; SLIME Inspector bug:
;;; Given a conforming implementation, the following scenario is
;;; possible (I think... at least, that is the case with SBCL):
;;;
;;; 1. Some integers cannot be coerced into single-float.
;;;
;;; 2. FORMAT floating-point printer ~E chooses to coerce integers
;;; into single-float.
;;;
;;; 3. FORMAT fails to coerce a given integer and chooses to error.
;;;
;;; The SLIME Inspector uses ~E when viewing integers, and fails to
;;; consider this scenario.
;;; SBCL bugs:
(defun foo ()
"Infinite loop instead of handling the error."
(loop for n from (expt 2 1024) do
(handler-case
(coerce n 'single-float)
(simple-type-error ()
(format t "Got here.~%")
(return-from foo)))))
(defun bar ()
"Fails to compile!"
(loop for n from (expt 2 1024) do
(handler-case
(format t "~E~%" (coerce n 'single-float))
(simple-type-error ()
(format t "Got here.~%")
(return-from bar)))))
This paste has no annotations.