From: Nikodemus Siivola Date: Tue, 4 Aug 2009 10:15:11 +0000 (+0000) Subject: 1.0.30.33: failed aver in %ALLOCATE-CLOSURES IR2 conversion X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=7217c0c2f1f8dc7934f8b0a25b9d3c4c4c6fe950;p=sbcl.git 1.0.30.33: failed aver in %ALLOCATE-CLOSURES IR2 conversion Patch by Larry D'Anna. He explains: This snippit (labels ((K (&optional x) #'k))) fails with failed AVER: (XEP-P XEP), in %ALLOCATE-CLOSURES-IR2-CONVERT-OPTIMIZER The problem is that it's trying to allocate a closure for the XEP for K, but K has been deleted because nothing references K except itself. %ALLOCATE-CLOSURES-IR2-CONVERT-OPTIMIZER already skips any leafs that lacks a XEP. This patch makes it also skip leafs who's XEPs have been deleted. --- diff --git a/CREDITS b/CREDITS index b412b4b..5492c8d 100644 --- a/CREDITS +++ b/CREDITS @@ -549,6 +549,10 @@ Douglas Crosher: CL:DEFINE-SYMBOL-MACRO, and a generalization of the type system's handling of the CONS type to allow ANSI-style (CONS FOO BAR) types. +Larry D'Anna: + He provided several parts of SB-CLTL2 environment access, and has + also worked on bugs in the IR2 conversion stage of the compiler. + Alexey Dejneka: He fixed many, many bugs on various themes, and has done a tremendous amount of work on the compiler in particular, fixing @@ -726,6 +730,10 @@ Scott Parish: Timothy Ritchey: He implemented SB-BSD-SOCKETS support for the win32 port. +Tobias Rittweiler + He has made several contributions relating to source locations, + pretty printing, SB-INTROSPECT, and the reader. + Kevin M. Rosenberg: He provided the ACL-style toplevel (sb-aclrepl contrib module), and a number of MOP-related bug reports. He also creates the official diff --git a/NEWS b/NEWS index ddfe733..7bdf0e5 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,8 @@ changes relative to sbcl-1.0.30: (thanks to Tobias Rittweiler) * bug fix: a failing AVER in CONVERT-MV-CALL has been fixed. (thanks to Larry D'Anna) + * bug fix: a failing AVER in %ALLOCATE-CLOSURES conversion has been fixed + (thanks to Larry D'Anna) * bug fix: SLEEP supports times over 100 million seconds on long on OpenBSD as well. (reported by Josh Elsasser) * bug fix: DELETE-FILE on streams no longer closes the stream with :ABORT T, diff --git a/src/compiler/ir2tran.lisp b/src/compiler/ir2tran.lisp index cb1126a..4796850 100644 --- a/src/compiler/ir2tran.lisp +++ b/src/compiler/ir2tran.lisp @@ -255,7 +255,11 @@ (vop current-stack-pointer call 2block (ir2-lvar-stack-pointer (lvar-info leaves)))) (dolist (leaf (lvar-value leaves)) - (binding* ((xep (functional-entry-fun leaf) :exit-if-null) + (binding* ((xep (awhen (functional-entry-fun leaf) + ;; if the xep's been deleted then we can skip it + (if (eq (functional-kind it) :deleted) + nil it)) + :exit-if-null) (nil (aver (xep-p xep))) (entry-info (lambda-info xep) :exit-if-null) (tn (entry-info-closure-tn entry-info) :exit-if-null) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index c49d8c4..60289eb 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -3220,3 +3220,8 @@ `(lambda () (flet ((k (&rest x) (declare (ignore x)) 0)) (multiple-value-call #'k #'k)))))))) + +(with-test (:name :allocate-closures-failing-aver) + (let ((f (compile nil `(lambda () + (labels ((k (&optional x) #'k))))))) + (assert (null (funcall f))))) diff --git a/version.lisp-expr b/version.lisp-expr index b00279f..3da7221 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.30.32" +"1.0.30.33"