- In sbcl-0.7.7.9,
- (multiple-value-prog1 (progn (the real '(1 2 3))))
- returns (1 2 3) instead of signalling an error. Also in sbcl-0.7.7.9,
- a more complicated instance of this bug kept
- (IGNORE-ERRORS (MIN '(1 2 3))) from returning NIL as it should when
- the MIN source transform expanded to (THE REAL '(1 2 3)), because
- (IGNORE-ERRORS (THE REAL '(1 2 3))) returns (1 2 3).
- Alexey Dejneka pointed out that
- (IGNORE-ERRORS (IDENTITY (THE REAL '(1 2 3)))) works as it should.
- (IGNORE-ERRORS (VALUES (THE REAL '(1 2 3)))) also works as it should.
- Perhaps this is another case of VALUES type intersections behaving
- in non-useful ways?
- When I (WHN) tried to use the VALUES trick to work around this bug
- in the MIN source transform, it didn't work for
- (assert (null (ignore-errors (min 1 #(1 2 3)))))
- Hand-expanding the source transform, I get
- (assert (null (ignore-errors
- (let ((arg1 1)
- (arg2 (identity (the real #(1 2 3)))))
- (if (< arg1 arg2) arg1 arg2)))))
- which fails (i.e. the assertion fails, because the IGNORE-ERRORS
- doesn't report MIN signalling a type error). At the REPL
- (null (ignore-errors
- (let ((arg1 1)
- (arg2 (identity (the real #(1 2 3)))))
- (if (< arg1 arg2) arg1 arg2))))
- => T
- but when this expression is used as the body of (DEFUN FOO () ...)
- then (FOO)=>NIL.
-
-195: "confusing reporting of not-a-REAL TYPE-ERRORs from THE REAL"
- In sbcl-0.7.7.10, (THE REAL #(1 2 3)) signals a type error which
- prints as "This is not a (OR SINGLE-FLOAT DOUBLE-FLOAT RATIONAL)".
- The (OR SINGLE-FLOAT DOUBLE-FLOAT RATIONAL) representation of
- REAL is unnecessarily confusing, especially since it relies on
- internal implementation knowledge that even with SHORT-FLOAT
- and LONG-FLOAT left out of the union, this type is equal to REAL.
- So it'd be better just to say "This is not a REAL".
-
-196: "confusing error message for unREAL second arg to ATAN"
- (reported by Alexey Dejneka sbcl-devel 2002-09-04)
- In sbcl-0.7.7.11,
- * (atan 1 #c(1 2))
- debugger invoked on condition of type SIMPLE-TYPE-ERROR:
- Argument X is not a NUMBER: #C(1 2)
- (The actual type problem is that argument Y is not a REAL.)
+ * 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.