1.0.43.24: initialize cold-layouts with source-location NIL, not 0
authorNikodemus Siivola <nikodemus@random-state.net>
Tue, 5 Oct 2010 07:46:57 +0000 (07:46 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Tue, 5 Oct 2010 07:46:57 +0000 (07:46 +0000)
 Fixes lp#458015.

NEWS
src/compiler/generic/genesis.lisp
tests/info.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index c8ee98e..d52d2e5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -27,6 +27,8 @@ changes relative to sbcl-1.0.43:
   * bug fix: better errors for unknown external-formats in OPEN. (lp#561974)
   * bug fix: DEBUG>SPEED no longer degrades ALIEN-FUNCALL performance quite
     so badly. (lp#654485)
+  * bug fix: SB-INTROSPECT:FIND-DEFINITION-SOURCES-BY-NAME no longer signals
+    an error for eg. STRUCTURE. (lp#458015)
 
 changes in sbcl-1.0.43 relative to sbcl-1.0.42:
   * incompatible change: FD-STREAMS no longer participate in the serve-event
index bbfca86..8f99ba4 100644 (file)
@@ -936,6 +936,7 @@ core and return a descriptor to it."
     (cold-set-layout-slot result 'info *nil-descriptor*)
     (cold-set-layout-slot result 'pure *nil-descriptor*)
     (cold-set-layout-slot result 'n-untagged-slots nuntagged)
+    (cold-set-layout-slot result 'source-location *nil-descriptor*)
     (cold-set-layout-slot result 'for-std-class-p *nil-descriptor*)
 
     (setf (gethash name *cold-layouts*)
index 8abd36b..113428a 100644 (file)
 ;;; the DEFUN is just LOADed instead of COMPILE-FILEd, and it's
 ;;; not immediately obvious what's the best way to set up
 ;;; the COMPILE-FILE test.
-#|
+#||
 (assert
   (equal
    (format nil "~A" (sb-int:info :function :type 'foo))
    "#<FUN-TYPE (FUNCTION (T T) LIST)>"))
-|#
+||#
+
+(with-test (:name :bug-458015)
+  ;; Make sure layouts have sane source-locations
+  (dolist (env sb-c::*info-environment*)
+    (sb-c::do-info (env :class class :type type :name info-name :value value)
+      (when (and (symbolp info-name)
+                 (eql class :type)
+                 (eql type :kind))
+        (let* ((classoid (sb-kernel:find-classoid info-name nil))
+               (layout (and classoid (sb-kernel:classoid-layout classoid)))
+               (srcloc (and layout (sb-kernel::layout-source-location layout))))
+          (when (and layout)
+            (assert (or (sb-c::definition-source-location-p srcloc)
+                        (null srcloc)))))))))
 
 ;;; success
index 402cb56..b34225a 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.43.23"
+"1.0.43.24"