+ (since 0.7.8.9 it does not signal an error; see also bug 199)
+
+183: "IEEE floating point issues"
+ Even where floating point handling is being dealt with relatively
+ well (as of sbcl-0.7.5, on sparc/sunos and alpha; see bug #146), the
+ accrued-exceptions and current-exceptions part of the fp control
+ word don't seem to bear much relation to reality. E.g. on
+ SPARC/SunOS:
+ * (/ 1.0 0.0)
+
+ debugger invoked on condition of type DIVISION-BY-ZERO:
+ arithmetic error DIVISION-BY-ZERO signalled
+ 0] (sb-vm::get-floating-point-modes)
+
+ (:TRAPS (:OVERFLOW :INVALID :DIVIDE-BY-ZERO)
+ :ROUNDING-MODE :NEAREST
+ :CURRENT-EXCEPTIONS NIL
+ :ACCRUED-EXCEPTIONS (:INEXACT)
+ :FAST-MODE NIL)
+ 0] abort
+ * (sb-vm::get-floating-point-modes)
+ (:TRAPS (:OVERFLOW :INVALID :DIVIDE-BY-ZERO)
+ :ROUNDING-MODE :NEAREST
+ :CURRENT-EXCEPTIONS (:INEXACT)
+ :ACCRUED-EXCEPTIONS (:INEXACT)
+ :FAST-MODE NIL)
+
+185: "top-level forms at the REPL"
+ * (locally (defstruct foo (a 0 :type fixnum)))
+ gives an error:
+ ; caught ERROR:
+ ; (in macroexpansion of (SB-KERNEL::%DELAYED-GET-COMPILER-LAYOUT BAR))
+ however, compiling and loading the same expression in a file works
+ as expected.
+
+187: "type inference confusion around DEFTRANSFORM time"
+ (reported even more verbosely on sbcl-devel 2002-06-28 as "strange
+ bug in DEFTRANSFORM")
+ After the file below is compiled and loaded in sbcl-0.7.5, executing
+ (TCX (MAKE-ARRAY 4 :FILL-POINTER 2) 0)
+ at the REPL returns an adjustable vector, which is wrong. Presumably
+ somehow the DERIVE-TYPE information for the output values of %WAD is
+ being mispropagated as a type constraint on the input values of %WAD,
+ and so causing the type test to be optimized away. It's unclear how
+ hand-expanding the DEFTRANSFORM would change this, but it suggests
+ the DEFTRANSFORM machinery (or at least the way DEFTRANSFORMs are
+ invoked at a particular phase) is involved.
+ (cl:in-package :sb-c)
+ (eval-when (:compile-toplevel)
+ ;;; standin for %DATA-VECTOR-AND-INDEX
+ (defknown %dvai (array index)
+ (values t t)
+ (foldable flushable))
+ (deftransform %dvai ((array index)
+ (vector t)
+ *
+ :important t)
+ (let* ((atype (continuation-type array))
+ (eltype (array-type-specialized-element-type atype)))
+ (when (eq eltype *wild-type*)
+ (give-up-ir1-transform
+ "specialized array element type not known at compile-time"))
+ (when (not (array-type-complexp atype))
+ (give-up-ir1-transform "SIMPLE array!"))
+ `(if (array-header-p array)
+ (%wad array index nil)
+ (values array index))))
+ ;;; standin for %WITH-ARRAY-DATA
+ (defknown %wad (array index (or index null))
+ (values (simple-array * (*)) index index index)
+ (foldable flushable))
+ ;;; (Commenting out this optimizer causes the bug to go away.)
+ (defoptimizer (%wad derive-type) ((array start end))
+ (let ((atype (continuation-type array)))
+ (when (array-type-p atype)
+ (values-specifier-type
+ `(values (simple-array ,(type-specifier
+ (array-type-specialized-element-type atype))
+ (*))
+ index index index)))))
+ ) ; EVAL-WHEN
+ (defun %wad (array start end)
+ (format t "~&in %WAD~%")
+ (%with-array-data array start end))
+ (cl:in-package :cl-user)
+ (defun tcx (v i)
+ (declare (type (vector t) v))
+ (declare (notinline sb-kernel::%with-array-data))
+ ;; (Hand-expending DEFTRANSFORM %DVAI here also causes the bug to
+ ;; go away.)
+ (sb-c::%dvai v i))
+
+188: "compiler performance fiasco involving type inference and UNION-TYPE"
+ (In sbcl-0.7.6.10, DEFTRANSFORM CONCATENATE was commented out until this
+ bug could be fixed properly, so you won't see the bug unless you restore
+ the DEFTRANSFORM by hand.) In sbcl-0.7.5.11 on a 700 MHz Pentium III,
+ (time (compile
+ nil
+ '(lambda ()
+ (declare (optimize (safety 3)))
+ (declare (optimize (compilation-speed 2)))
+ (declare (optimize (speed 1) (debug 1) (space 1)))
+ (let ((fn "if-this-file-exists-the-universe-is-strange"))
+ (load fn :if-does-not-exist nil)
+ (load (concatenate 'string fn ".lisp") :if-does-not-exist nil)
+ (load (concatenate 'string fn ".fasl") :if-does-not-exist nil)
+ (load (concatenate 'string fn ".misc-garbage")
+ :if-does-not-exist nil)))))
+ reports
+ 134.552 seconds of real time
+ 133.35156 seconds of user run time
+ 0.03125 seconds of system run time
+ [Run times include 2.787 seconds GC run time.]
+ 0 page faults and
+ 246883368 bytes consed.
+ BACKTRACE from Ctrl-C in the compilation shows that the compiler is
+ thinking about type relationships involving types like
+ #<UNION-TYPE
+ (OR (INTEGER 576 576)
+ (INTEGER 1192 1192)
+ (INTEGER 2536 2536)
+ (INTEGER 1816 1816)
+ (INTEGER 2752 2752)
+ (INTEGER 1600 1600)
+ (INTEGER 2640 2640)
+ (INTEGER 1808 1808)
+ (INTEGER 1296 1296)
+ ...)>)[:EXTERNAL]
+
+190: "PPC/Linux pipe? buffer? bug"
+ In sbcl-0.7.6, the run-program.test.sh test script sometimes hangs
+ on the PPC/Linux platform, waiting for a zombie env process. This
+ is a classic symptom of buffer filling and deadlock, but it seems
+ only sporadically reproducible.
+
+191: "Miscellaneous PCL deficiencies"
+ (reported by Alexey Dejneka sbcl-devel 2002-08-04)
+ a. DEFCLASS does not inform the compiler about generated
+ functions. Compiling a file with
+ (DEFCLASS A-CLASS ()
+ ((A-CLASS-X)))
+ (DEFUN A-CLASS-X (A)
+ (WITH-SLOTS (A-CLASS-X) A
+ A-CLASS-X))
+ results in a STYLE-WARNING:
+ undefined-function
+ SB-SLOT-ACCESSOR-NAME::|COMMON-LISP-USER A-CLASS-X slot READER|
+
+ APD's fix for this was checked in to sbcl-0.7.6.20, but Pierre
+ Mai points out that the declamation of functions is in fact
+ incorrect in some cases (most notably for structure
+ classes). This means that at present erroneous attempts to use
+ WITH-SLOTS and the like on classes with metaclass STRUCTURE-CLASS
+ won't get the corresponding STYLE-WARNING.
+ c. the examples in CLHS 7.6.5.1 (regarding generic function lambda
+ lists and &KEY arguments) do not signal errors when they should.
+
+192: "Python treats free type declarations as promises."
+ b. What seemed like the same fundamental problem as bug 192a, but
+ was not fixed by the same (APD "more strict type checking
+ sbcl-devel 2002-08-97) patch:
+ (DOTIMES (I ...) (DOTIMES (J ...) (DECLARE ...) ...)):
+ (declaim (optimize (speed 1) (safety 3)))
+ (defun trust-assertion (i)
+ (dotimes (j i)
+ (declare (type (mod 4) i)) ; when commented out, behavior changes!
+ (unless (< i 5)
+ (print j))))
+ (trust-assertion 6) ; prints nothing unless DECLARE is commented out
+
+ (see bug 203)
+
+193: "unhelpful CLOS error reporting when the primary method is missing"
+ In sbcl-0.7.7, when
+ (defmethod foo :before ((x t)) (print x))
+ is the only method defined on FOO, the error reporting when e.g.
+ (foo 12)
+ is relatively unhelpful:
+ There is no primary method for the generic function
+ #<STANDARD-GENERIC-FUNCTION FOO (1)>.
+ with the offending argument nowhere visible in the backtrace. This
+ continues even if there *are* primary methods, just not for the
+ specified arg type, e.g.
+ (defmethod foo ((x character)) (print x))
+ (defmethod foo ((x string)) (print x))
+ (defmethod foo ((x pathname)) ...)
+ In that case it could be very helpful to know what argument value is
+ falling through the cracks of the defined primary methods, but the
+ error message stays the same (even BACKTRACE doesn't tell you what the
+ bad argument value is).
+
+194: "no error from (THE REAL '(1 2 3)) in some cases"
+ fixed parts:
+ a. In sbcl-0.7.7.9,
+ (multiple-value-prog1 (progn (the real '(1 2 3))))
+ returns (1 2 3) instead of signalling an error. This was fixed by
+ APD's "more strict type checking patch", but although the fixed
+ code (in sbcl-0.7.7.19) works (signals TYPE-ERROR) interactively,
+ it's difficult to write a regression test for it, because
+ (IGNORE-ERRORS (MULTIPLE-VALUE-PROG1 (PROGN (THE REAL '(1 2 3)))))
+ still returns (1 2 3).
+ still-broken parts:
+ b. (IGNORE-ERRORS (MULTIPLE-VALUE-PROG1 (PROGN (THE REAL '(1 2 3)))))
+ returns (1 2 3). (As above, this shows up when writing regression
+ tests for fixed-ness of part a.)
+ c. Also in sbcl-0.7.7.9, (IGNORE-ERRORS (THE REAL '(1 2 3))) => (1 2 3).
+ d. At the REPL,
+ (null (ignore-errors
+ (let ((arg1 1)
+ (arg2 (identity (the real #(1 2 3)))))
+ (if (< arg1 arg2) arg1 arg2))))
+ => T
+ but putting the same expression inside (DEFUN FOO () ...),
+ (FOO) => NIL.
+ notes:
+ * Actually this entry is probably multiple bugs, as
+ Alexey Dejneka commented on sbcl-devel 2002-09-03:)
+ I don't think that placing these two bugs in one entry is
+ a good idea: they have different explanations. The second
+ (min 1 nil) is caused by flushing of unused code--IDENTITY
+ can do nothing with it. So it is really bug 122. The first
+ (min nil) is due to M-V-PROG1: substituting a continuation
+ for the result, it forgets about type assertion. The purpose
+ of IDENTITY is to save the restricted continuation from
+ inaccurate transformations.
+ * Alexey Dejneka pointed out that
+ (IGNORE-ERRORS (IDENTITY (THE REAL '(1 2 3))))
+ works as it should. Also
+ (IGNORE-ERRORS (VALUES (THE REAL '(1 2 3))))
+ works as it should. Perhaps this is another case of VALUES type
+ intersections behaving in non-useful ways?
+
+199: "hairy FUNCTION types confuse the compiler"
+ (reported by APD sbcl-devel 2002-09-15)
+ (DEFUN MUR (F)
+ (EQ NIL (FUNCALL F)))
+
+ (DEFUN FOO (F X)
+ (DECLARE (TYPE (AND FUNCTION (SATISFIES MUR)) F))
+ (FUNCALL F X))
+
+ fails to compile, printing
+ failed AVER:
+ "(AND (EQ (IR2-CONTINUATION-PRIMITIVE-TYPE 2CONT) FUNCTION-PTYPE) (EQ CHECK T))"
+
+ APD further reports that this bug is not present in CMUCL.
+
+ (this case was fixed in 0.7.8.9; see also bug 178)
+
+201: "Incautious type inference from compound CONS types"
+ (reported by APD sbcl-devel 2002-09-17)
+ (DEFUN FOO (X)
+ (LET ((Y (CAR (THE (CONS INTEGER *) X))))
+ (SETF (CAR X) NIL)
+ (FORMAT NIL "~S IS ~S, Y = ~S"
+ (CAR X)
+ (TYPECASE (CAR X)
+ (INTEGER 'INTEGER)
+ (T '(NOT INTEGER)))
+ Y)))
+
+ (FOO ' (1 . 2)) => "NIL IS INTEGER, Y = 1"
+
+203:
+ Compiler does not check THEs on unused values, e.g. in
+
+ (progn (the real (list 1)) t)
+
+ This situation may appear during optimizing away degenerate cases of
+ certain functions: see bugs 54, 192b.
+
+205: "environment issues in cross compiler"
+ (These bugs have no impact on user code, but should be fixed or
+ documented.)
+ a. Macroexpanders introduced with MACROLET are defined in the null
+ lexical environment.
+ b. The body of (EVAL-WHEN (:COMPILE-TOPLEVEL) ...) is evaluated in
+ the null lexical environment.
+
+206: ":SB-FLUID feature broken"
+ (reported by Antonio Martinez-Shotton sbcl-devel 2002-10-07)
+ Enabling :SB-FLUID in the target-features list in sbcl-0.7.8 breaks
+ the build.
+
+207: "poorly distributed SXHASH results for compound data"
+ SBCL's SXHASH could probably try a little harder. ANSI: "the
+ intent is that an implementation should make a good-faith
+ effort to produce hash-codes that are well distributed
+ within the range of non-negative fixnums". But
+ (let ((hits (make-hash-table)))
+ (dotimes (i 16)
+ (dotimes (j 16)
+ (let* ((ij (cons i j))
+ (newlist (push ij (gethash (sxhash ij) hits))))
+ (when (cdr newlist)
+ (format t "~&collision: ~S~%" newlist))))))
+ reports lots of collisions in sbcl-0.7.8. A stronger MIX function
+ would be an obvious way of fix. Maybe it would be acceptably efficient
+ to redo MIX using a lookup into a 256-entry s-box containing
+ 29-bit pseudorandom numbers?
+
+208: "package confusion in PCL handling of structure slot handlers"
+ In sbcl-0.7.8 compiling and loading
+ (in-package :cl)
+ (defstruct foo (slot (error "missing")) :type list :read-only t)
+ (defmethod print-object ((foo foo) stream) (print nil stream))
+ causes CERROR "attempting to modify a symbol in the COMMON-LISP
+ package: FOO-SLOT". (This is fairly bad code, but still it's hard
+ to see that it should cause symbols to be interned in the CL package.)
+
+209: "DOCUMENTATION generic function has wrong argument precedence order"
+ (fixed in sbcl-0.7.8.39)
+
+210: "unsafe evaluation of DEFSTRUCT slot initforms in BOA constructors"
+ (fixed in sbcl-0.7.8.35)
+
+211: "keywords processing"
+ a. :ALLOW-OTHER-KEYS T should allow a function to receive an odd
+ number of keyword arguments.
+ b. Compiling of a local call with an unknown key and
+ :ALLOW-OTHER-KEYS T should not cause a WARNING.
+ c. Compiler should not warn on an unknown key :ALLOW-OTHER-KEYS.
+
+212: "Sequence functions and circular arguments"
+ COERCE, MERGE and CONCATENATE go into an infinite loop when given
+ circular arguments; it would be good for the user if they could be
+ given an error instead (ANSI 17.1.1 allows this behaviour on the part
+ of the implementation, as conforming code cannot give non-proper
+ sequences to these functions. MAP also has this problem (and
+ solution), though arguably the convenience of being able to do
+ (MAP 'LIST '+ FOO '#1=(1 . #1#))
+ might be classed as more important (though signalling an error when
+ all of the arguments are circular is probably desireable).
+
+213: "Sequence functions and type checking"
+ a. MAKE-SEQUENCE, COERCE, MERGE and CONCATENATE cannot deal with
+ various complicated, though recognizeable, CONS types [e.g.
+ (CONS * (CONS * NULL))
+ which according to ANSI should be recognized] (and, in SAFETY 3
+ code, should return a list of LENGTH 2 or signal an error)
+ b. MAP, when given a type argument that is SUBTYPEP LIST, does not
+ check that it will return a sequence of the given type. Fixing
+ it along the same lines as the others (cf. work done around
+ sbcl-0.7.8.45) is possible, but doing so efficiently didn't look
+ entirely straightforward.
+ c. All of these functions will silently accept a type of the form
+ (CONS INTEGER *)
+ whether or not the return value is of this type. This is
+ probably permitted by ANSI (see "Exceptional Situations" under
+ ANSI MAKE-SEQUENCE), but the DERIVE-TYPE mechanism does not
+ know about this escape clause, so code of the form
+ (INTEGERP (CAR (MAKE-SEQUENCE '(CONS INTEGER *) 2)))
+ can erroneously return T.
+