From 3357d40adfad43ce33a84cdf888977299241f8c8 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sat, 7 Apr 2007 17:42:05 +0000 Subject: [PATCH] 1.0.4.40: small fixes * / is not flushable, but unsafely-flushable. Reported by Marco Monteiro, patch by Kevin Reid. Test-case added to compiler.pure.lisp. * #include "globals.h" for funcall.c, should unbreak the build for non-x86oids. * s/(AND (UNSIGNED-BYTE FIXNUM))/(AND UNSIGNED-BYTE FIXNUM)/ in combin.lisp, discovered by James Anderson. --- BUGS | 9 +++++++++ NEWS | 2 ++ src/compiler/fndb.lisp | 2 +- src/pcl/combin.lisp | 2 +- src/runtime/funcall.c | 1 + tests/compiler.pure.lisp | 14 ++++++++++++++ version.lisp-expr | 2 +- 7 files changed, 29 insertions(+), 3 deletions(-) diff --git a/BUGS b/BUGS index 55bb754..74ffb2d 100644 --- a/BUGS +++ b/BUGS @@ -1792,3 +1792,12 @@ WORKAROUND: Test :NAN-COMPARISONS in float.pure.lisp fails on x86-64, and has been disabled on those platforms. Since x86 does not exhibit any problems the problem is probably with the new FP implementation. + +412: deletion of global variable references in safe code + The following returns 1 instead of signalling an error. + (funcall (compile nil + '(lambda () + (declare (optimize (safety 3))) + #:unbound + 42))) + Reported by Marco Monteiro on sbcl-devel. diff --git a/NEWS b/NEWS index 6abedd4..8ee6c2d 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ changes in sbcl-1.0.5 relative to sbcl-1.0.4: in multithreaded application code. * optimization: GET-INTERNAL-REAL-TIME has been optimized on POSIX platforms. (thanks to James Anderson for the optimization hint) + * bug fix: / with an unused value was being deleted in safe code. + (thanks to Marco Monteiro and Kevin Reid) * bug fix: number of characters that can be written onto a single line in a file is unlimited. * bug fix: some GC deadlocks caused by asynchronous interrupts have diff --git a/src/compiler/fndb.lisp b/src/compiler/fndb.lisp index 249ff05..dd90826 100644 --- a/src/compiler/fndb.lisp +++ b/src/compiler/fndb.lisp @@ -231,7 +231,7 @@ (defknown * (&rest number) number (movable foldable flushable explicit-check)) (defknown / (number &rest number) number - (movable foldable flushable explicit-check)) + (movable foldable unsafely-flushable explicit-check)) (defknown (1+ 1-) (number) number (movable foldable flushable explicit-check)) diff --git a/src/pcl/combin.lisp b/src/pcl/combin.lisp index 4fcc2ef..c65f390 100644 --- a/src/pcl/combin.lisp +++ b/src/pcl/combin.lisp @@ -248,7 +248,7 @@ `(list* ,@required (sb-c::%listify-rest-args .dfun-more-context. - (the (and (unsigned-byte fixnum)) + (the (and unsigned-byte fixnum) .dfun-more-count.))) `(list ,@required)))) `(lambda ,ll diff --git a/src/runtime/funcall.c b/src/runtime/funcall.c index 815268a..e364ec2 100644 --- a/src/runtime/funcall.c +++ b/src/runtime/funcall.c @@ -17,6 +17,7 @@ #include "sbcl.h" #include "runtime.h" +#include "globals.h" /* This is implemented in assembly language and called from C: */ extern lispobj call_into_lisp(lispobj fun, lispobj *args, int nargs); diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 69fcd3c..ff91c66 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -2201,3 +2201,17 @@ y) (integer-length x))))) warned-p)) + +;; Dead / in safe code +(with-test (:name :safe-dead-/) + (assert (eq :error + (handler-case + (funcall (compile nil + '(lambda (x y) + (declare (optimize (safety 3))) + (/ x y) + (+ x y))) + 1 + 0) + (division-by-zero () + :error))))) diff --git a/version.lisp-expr b/version.lisp-expr index b1e1205..a998fd6 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; 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.4.39" +"1.0.4.40" -- 1.7.10.4