Commit
b894cb41d869bda6ba0c54a491becc7bb58375c1 (make FORMAT signal
errors with illegal COLINC etc. parameters) happened to fix bug 905817
(endless loop in FORMAT with zero COLINC), then unnoticed, so add a
regression test and NEWS now.
Commit
96c62c30ec9164419c790b2fbea953da2193620f (ensure that GCD returns
positive values) besides the one intended also fixed bug 516750 (type
error when trying to convert a sum of rationals to a float). Add the
failing expression from that bug to the existing test.
* bug fix: compiler-macro lambda-lists specifying non-keyword symbols
as keyword arguments no longer accidentally match unevaluated symbols
against them.
+ * bug fix: FORMAT used to loop infinitely in some cases when a COLINC
+ parameter was zero, now it signals an error. (lp#905817, fixed since
+ 1.0.56.19)
changes in sbcl-1.0.57 relative to sbcl-1.0.56:
* RANDOM enhancements and bug fixes:
;; GCD used to sometimes return negative values. The following did, on 32 bit
;; builds.
(with-test (:name :gcd)
+ ;; from lp#413680
(assert (plusp (gcd 20286123923750474264166990598656
- 680564733841876926926749214863536422912))))
+ 680564733841876926926749214863536422912)))
+ ;; from lp#516750
+ (assert (plusp (gcd 2596102012663483082521318626691873
+ 2596148429267413814265248164610048))))
(with-test (:name :expt-zero-zero)
;; Check that (expt 0.0 0.0) and (expt 0 0.0) signal error, but (expt 0.0 0)
(assert (raises-error? (format nil "~-2a" 1)))
(assert (raises-error? (format nil "~,0a" 1))))
+(with-test (:name :bug-905817)
+ ;; The bug manifests itself in an endless loop in FORMAT.
+ ;; Correct behaviour is to signal an error.
+ (handler-case
+ (with-timeout 5
+ (assert (raises-error? (format nil "e~8,0s" 12395))))
+ (timeout ()
+ (error "Endless loop in FORMAT"))))
+
;;; success