1.0.5.31: Make sb-introspect's FUNCTION-ARGLIST safer
authorChristophe Rhodes <csr21@cantab.net>
Fri, 4 May 2007 11:49:21 +0000 (11:49 +0000)
committerChristophe Rhodes <csr21@cantab.net>
Fri, 4 May 2007 11:49:21 +0000 (11:49 +0000)
... less likely to read off some random word in memory
as an arglist.

contrib/sb-introspect/sb-introspect.lisp
contrib/sb-introspect/test-driver.lisp
version.lisp-expr

index 8ef3113..e54f5c4 100644 (file)
@@ -411,8 +411,7 @@ not found"
         #+sb-eval
         ((typep function 'sb-eval:interpreted-function)
          (sb-eval:interpreted-function-lambda-list function))
-        (t (sb-impl::%simple-fun-arglist
-            (sb-impl::%closure-fun function)))))
+        (t (sb-kernel:%simple-fun-arglist (sb-kernel:%fun-fun function)))))
 
 (defun struct-accessor-structure-class (function)
   (let ((self (sb-vm::%simple-fun-self function)))
index 03fdedd..ee24543 100644 (file)
@@ -12,6 +12,9 @@
 (assert (equal (function-arglist 'the)
                '(type sb-c::value)))
 
+(assert (equal (function-arglist #'(sb-pcl::slow-method cl-user::j (t)))
+               '(sb-pcl::method-args sb-pcl::next-methods)))
+
 (let ((source (find-definition-source #'cl-user::one)))
   (assert (= (definition-source-file-write-date source)
              (file-write-date (merge-pathnames "test.lisp" *load-pathname*))))
index 7ff21c4..347db28 100644 (file)
@@ -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.5.30"
+"1.0.5.31"