From e6548115817f37831f7fa966d9b723dc3f12b2a0 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Mon, 17 May 2004 16:37:27 +0000 Subject: [PATCH] 0.8.10.31: Fix for bug reported by piso on #lisp: ... (MAKE-PACKAGE "FOO" NIL NIL) should signal an error; ... NB: this commit does not fix the cases in PFD's test suite, which presumably go through some local call analysis rather than &MORE entry conversion. --- NEWS | 3 +++ src/compiler/ir1tran-lambda.lisp | 4 ++-- tests/eval.impure.lisp | 8 ++++++++ version.lisp-expr | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index c278247..870970d 100644 --- a/NEWS +++ b/NEWS @@ -2437,6 +2437,9 @@ changes in sbcl-0.8.11 relative to sbcl-0.8.10: * fixed bug: as reported by Kalle Olavi Niemitalo on #lisp IRC, don't warn on legal loop code involving more than one aggregate boolean. (thanks to Nikodemus Siivola) + * fixed bug: as reported by Peter Graves on #lisp IRC, passing a NIL + in keyword position to MAKE-PACKAGE was not being reported as + invalid. * optimization: rearranged the expansion of various defining macros so that each expands into only one top-level form in a :LOAD-TOPLEVEL context; this appears to decrease fasl sizes by diff --git a/src/compiler/ir1tran-lambda.lisp b/src/compiler/ir1tran-lambda.lisp index ec19c9e..053b6df 100644 --- a/src/compiler/ir1tran-lambda.lisp +++ b/src/compiler/ir1tran-lambda.lisp @@ -595,7 +595,7 @@ (tests `((eq ,n-key :allow-other-keys) (setq ,n-allowp ,n-value-temp)))) (tests `(t - (setq ,n-losep ,n-key)))) + (setq ,n-losep (list ,n-key))))) (body `(when (oddp ,n-count) @@ -614,7 +614,7 @@ (unless allowp (body `(when (and ,n-losep (not ,n-allowp)) - (%unknown-key-arg-error ,n-losep))))))) + (%unknown-key-arg-error (car ,n-losep)))))))) (let ((ep (ir1-convert-lambda-body `((let ,(temps) diff --git a/tests/eval.impure.lisp b/tests/eval.impure.lisp index 3f7aa88..f48801e 100644 --- a/tests/eval.impure.lisp +++ b/tests/eval.impure.lisp @@ -116,5 +116,13 @@ foo))) error)) +;;; MAKE-PACKAGE (and other &key functions) should signal an error +;;; when given a NIL key. This is kind of a compiler test really, but +;;; this'll do as a resting place. +(handler-case + (eval '(make-package "FOO" nil nil)) + (error () :ok) + (:no-error (c) (error "MAKE-PACKAGE succeeded: ~S" c))) + ;;; success (sb-ext:quit :unix-status 104) diff --git a/version.lisp-expr b/version.lisp-expr index a063d72..676fef9 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".) -"0.8.10.30" +"0.8.10.31" -- 1.7.10.4