correct generic function definition in the PCL source code, SBCL
returns "WRONG!" for the call.
+210: "unsafe evaluation of DEFSTRUCT slot initforms in BOA constructors"
+ (fixed in sbcl-0.7.8.35)
+
DEFUNCT CATEGORIES OF BUGS
IR1-#:
These labels were used for bugs related to the old IR1 interpreter.
(let ((,instance (truly-the ,(dd-name dd)
(%make-instance-with-layout
(%delayed-get-compiler-layout ,(dd-name dd))))))
- (declare (optimize (safety 0))) ; Suppress redundant slot type checks.
,@(when raw-index
`((setf (%instance-ref ,instance ,raw-index)
(make-array ,(dd-raw-length dd)
(error "YA-STRUCT-P of no arguments should signal an error."))
(when (ignore-errors (or (ya-struct-p 'too 'many 'arguments) 12))
(error "YA-STRUCT-P of three arguments should signal an error."))
+
+;;; bug 210: Until sbcl-0.7.8.32 BOA constructors had SAFETY 0
+;;; declared inside on the theory that slot types were already
+;;; checked, which bogusly suppressed unbound-variable and other
+;;; checks within the evaluation of initforms.
+(defvar *bug210*)
+(defstruct (bug210a (:constructor bug210a ()))
+ (slot *bug210*))
+(defstruct bug210b
+ (slot *bug210*))
+;;; Because of bug 210, this assertion used to fail.
+(assert (typep (nth-value 1 (ignore-errors (bug210a))) 'unbound-variable))
+;;; Even with bug 210, these assertions succeeded.
+(assert (typep (nth-value 1 (ignore-errors *bug210*)) 'unbound-variable))
+(assert (typep (nth-value 1 (ignore-errors (make-bug210b))) 'unbound-variable))
\f
;;; success
(format t "~&/returning success~%")
;;; relevant result, so this must be a string, not NIL.
;;;
;;; Conventionally a string like "0.6.6", with three numeric fields,
-;;; is used for released versions, and a string like "0.6.5.12", with
-;;; four numeric fields, is used for CVS 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".)
+;;; is used for released versions, and a string like "0.6.5.xyzzy",
+;;; with something arbitrary in the fourth field, is used for CVS
+;;; 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.7.8.34"
+"0.7.8.35"