Update of /cvsroot/sbcl/sbcl
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv30982
126.96.36.199: better handling of derived function types
Fixes bug 657499, and improves the earlier fix of 655126.
* Sort out TYPE vs. DEFINED-TYPE in FIND-GLOBAL-FUN:
** TYPE is the declarared type, OR the derived type iff
*derive-function-types* is true, no ftype has been declared,
we're not explicitly late-binding, and the function is not
** DEFINED-TYPE is the derived type, or FUNCTION if the function has
been declared NOTINLINE or we're late-binding.
Previously TYPE (which is what the rest of the system trusts
implcitly) was the derived type for functions in the same file
not declared NOTINLINE.
* ASSERT-CALL-TYPE can now be used in "untrusted" cases as well:
argument types are asserted as before, but instead of using
DERIVE-NODE-TYPE to annotate the function LVAR with its type, we
instead assert the return-type when appropriate.
* VALIDATE-CALL-TYPE is now called with DEFINED-TYPE from
IR1-CONVERT-COMBINATION-CHECKING-TYPE: the DEFINED-TYPE may be used
there in an untrusted call to ASSERT-CALL-TYPE.
Also keep track of the leaves whose DEFINED-TYPE we have asserted,
so that we won't do duplicate work. New slot in COMBINATION:
TYPE-VALIDATED-FOR-LEAF is utilized for this.
* LEAF-WHERE-FROM can now also be :DEFINED-HERE, meaning the
definition originates in the file being compiled -- this
information is used by VALIDATE-CALL-TYPE, and filled in by
FIND-FREE-FUN and FIND-GLOBAL-FUN.
* Adjust the tests for 655126 to account for full warnings
in case *derive-function-types* and self-calls.
RCS file: /cvsroot/sbcl/sbcl/NEWS,v
retrieving revision 1.1836
retrieving revision 1.1837
diff -u -d -r1.1836 -r1.1837
--- NEWS 13 Oct 2010 15:07:29 -0000 1.1836
+++ NEWS 14 Oct 2010 16:32:51 -0000 1.1837
@@ -11,6 +11,9 @@
* enhancement: ATOMIC-INCF now supports AREF of (SIMPLE-ARRAY SB-EXT:WORD (*))
as a place.
* enhancement: ASDF has been updated to 2.009.
+ * enhancement: the system detects known type-erros in calls better,
+ signalling a full warning about violated proclaimed FTYPEs and violations
+ of derived FTYPEs within the same file, including self-calls.
* optimization: constant-folding exploits numeric and character types, in
addition member types.
* optimization: numeric, character and member types that are inhabited by
@@ -59,6 +62,9 @@
* bug fix: incorrect FILE-POSITION on streams opened using :EXTERNAL-FORMAT
:DEFAULT when the default external had character size other than 8 bits.
+ * bug fix: derived types of functions in the same file were implicitly
+ trusted, leading to potential heap corruption when those function were
+ defined incompatibly. (lp#657499)
changes in sbcl-1.0.43 relative to sbcl-1.0.42:
* incompatible change: FD-STREAMS no longer participate in the serve-event
RCS file: /cvsroot/sbcl/sbcl/version.lisp-expr,v
retrieving revision 1.5083
retrieving revision 1.5084
diff -u -d -r1.5083 -r1.5084
--- version.lisp-expr 14 Oct 2010 11:40:39 -0000 1.5083
+++ version.lisp-expr 14 Oct 2010 16:32:51 -0000 1.5084
@@ -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".)