0.7.10.34:
[sbcl.git] / BUGS
diff --git a/BUGS b/BUGS
index e1e6c12..d023a79 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -283,10 +283,6 @@ WORKAROUND:
   need to document exactly what metaobject protocol specification
   we're following -- the current code is just inherited from PCL.)
 
-54:
-  The implementation of #'+ returns its single argument without
-  type checking, e.g. (+ "illegal") => "illegal".
-
 60:
   The debugger LIST-LOCATIONS command doesn't work properly.
 
@@ -506,22 +502,6 @@ WORKAROUND:
   time trying to GC afterwards. Surely there's some more economical
   way to implement (ROOM T).
 
-115:
-  reported by Martin Atzmueller 2001-06-25; originally from CMU CL bugs
-  collection:
-    (in-package :cl-user)
-    ;;; The following invokes a compiler error.
-    (declaim (optimize (speed 2) (debug 3)))
-    (defun tst ()
-      (flet ((m1 ()
-               (unwind-protect nil)))
-        (if (catch nil)
-          (m1)
-          (m1))))
-  The error message in sbcl-0.6.12.42 is
-    internal error, failed AVER:
-      "(COMMON-LISP:EQ (SB!C::TN-ENVIRONMENT SB!C:TN) SB!C::TN-ENV)"
-
 117:
   When the compiler inline expands functions, it may be that different
   kinds of return values are generated from different code branches.
@@ -636,12 +616,6 @@ WORKAROUND:
    Evidently Python thinks of the lambda as a code transformation so
    much that it forgets that it's also an object.
 
-127:
-  The DEFSTRUCT section of the ANSI spec, in the :CONC-NAME section,
-  specifies a precedence rule for name collisions between slot accessors of
-  structure classes related by inheritance. As of 0.7.0, SBCL still 
-  doesn't follow it.
-
 135:
   Ideally, uninterning a symbol would allow it, and its associated
   FDEFINITION and PROCLAIM data, to be reclaimed by the GC. However,
@@ -652,22 +626,17 @@ WORKAROUND:
   forever, even when it is uninterned and all other references to it
   are lost.
 
-136:
-  (reported by Arnaud Rouanet on cmucl-imp 2001-12-18)
-    (defmethod foo ((x integer))
-      x)
-    (defmethod foo :around ((x integer))
-      (let ((x (1+ x)))
-        (call-next-method)))
-  Now (FOO 3) should return 3, but instead it returns 4.
-
-141: 
-  Pretty-printing nested backquotes doesn't work right, as 
-  reported by Alexey Dejneka sbcl-devel 2002-01-13:
-  * '``(FOO ,@',@S)
-  ``(FOO SB-IMPL::BACKQ-COMMA-AT S)
-  * (lisp-implementation-version)
-  "0.pre7.129"
+141: "pretty printing and backquote"
+  a.
+    * '``(FOO ,@',@S)
+    ``(FOO SB-IMPL::BACKQ-COMMA-AT S)
+
+  b.
+    * (write '`(, .ala.) :readably t :pretty t)
+    `(,.ALA.)
+
+  (note the space between the comma and the point)
+
 
 143:
   (reported by Jesse Bouwman 2001-10-24 through the unfortunately
@@ -813,19 +782,6 @@ WORKAROUND:
   code. Since then the warning has been downgraded to STYLE-WARNING, 
   so it's still a bug but at least it's a little less annoying.
 
-178: "AVER failure compiling confused THEs in FUNCALL"
-  In sbcl-0.7.4.24, compiling
-    (defun bug178 (x)
-      (funcall (the function (the standard-object x))))
-  gives
-    failed AVER:
-      "(AND (EQ (IR2-CONTINUATION-PRIMITIVE-TYPE 2CONT) FUNCTION-PTYPE) (EQ CHECK T))"
-  This variant compiles OK, though:
-    (defun bug178alternative (x)
-      (funcall (the nil x)))
-
-  (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
@@ -988,25 +944,6 @@ WORKAROUND:
 
      (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, 
@@ -1014,11 +951,11 @@ WORKAROUND:
        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 
+       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)))))    
+  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).
@@ -1043,27 +980,9 @@ WORKAROUND:
        inaccurate transformations.
     * Alexey Dejneka pointed out that
        (IGNORE-ERRORS (IDENTITY (THE REAL '(1 2 3))))
-      works as it should. Also
+      and
        (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)
+      work as they should.
 
 201: "Incautious type inference from compound CONS types"
   (reported by APD sbcl-devel 2002-09-17)
@@ -1085,7 +1004,7 @@ WORKAROUND:
     (progn (the real (list 1)) t)
 
   This situation may appear during optimizing away degenerate cases of
-  certain functions: see bugs 54, 192b.
+  certain functions: see bug 192b.
 
 205: "environment issues in cross compiler"
   (These bugs have no impact on user code, but should be fixed or
@@ -1094,6 +1013,8 @@ WORKAROUND:
      lexical environment.
   b. The body of (EVAL-WHEN (:COMPILE-TOPLEVEL) ...) is evaluated in
      the null lexical environment.
+  c. The cross-compiler cannot inline functions defined in a non-null
+     lexical environment.
 
 206: ":SB-FLUID feature broken"
   (reported by Antonio Martinez-Shotton sbcl-devel 2002-10-07)
@@ -1118,7 +1039,7 @@ WORKAROUND:
   29-bit pseudorandom numbers?
 
 208: "package confusion in PCL handling of structure slot handlers"
-  In sbcl-0.7.8 compiling and loading 
+  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))
@@ -1138,7 +1059,7 @@ WORKAROUND:
 
        ; in: LAMBDA NIL
        ;     (FOO :Y 1 :Y 2)
-       ; 
+       ;
        ; caught STYLE-WARNING:
        ;   The variable #:G15 is defined but never used.
 
@@ -1148,14 +1069,14 @@ WORKAROUND:
   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#)) 
+  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. 
+     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)
@@ -1168,7 +1089,7 @@ WORKAROUND:
        (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 
+     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.
@@ -1243,75 +1164,63 @@ WORKAROUND:
   (defun test (x y) (the (values integer) (truncate x y)))
   (test 10 4) => 2
 
-219: "DEFINE-COMPILER-MACRO in non-toplevel contexts evaluated at compile-time"
-  In sbcl-0.7.9:
-
-  * (defun foo (x) 
-      (when x
-        (define-compiler-macro bar (&whole whole)
-          (declare (ignore whole))
-          (print "expanding compiler macro")
-          1)))
-  FOO
-  * (defun baz (x) (bar))
-  [ ... ]
-  "expanding compiler macro"
-  BAZ
-  * (baz t)
-  1
-
-220: 
+220:
   Sbcl 0.7.9 fails to compile
 
   (multiple-value-call #'list
     (the integer (helper))
     nil)
 
-  Type check for INTEGER is inserted, the result of which serves as
-  the first argument of M-V-C, is inserted after evaluation of NIL. So
-  arguments of M-V-C are pushed in the wrong order. As a temporary
-  workaround type checking was disabled for M-V-Cs in 0.7.9.13. A
-  better solution would be to put a check between evaluation of
-  arguments, but it could be tricky to check result types of PROG1, IF
-  etc.
-
-222: "environment problems in PCL"
-  Evaluating
-
-    (symbol-macrolet ((x 1))
-      (defmethod foo (z)
-        (macrolet ((ml (form) `(progn ,form ,x)))
-          (ml (print x)))))
-
-  causes
-
-    debugger invoked on condition of type UNBOUND-VARIABLE:
-      The variable X is unbound.
-
-223: "(SETF FDEFINITION) and #' semantics broken for wrappers"
-  Although this
-    (defun foo (x)
-      (print x))
-    (defun traced (fn)
-      (lambda (&rest rest)
-        (format t "~&about to call ~S on ~S~%" fn rest)
-        (apply fn rest)
-        (format t "~&returned from ~S~%" fn)))
-    (setf (fdefinition 'foo)
-          (traced #'foo))
-    (foo 11)
-  does what one would expect, this
-    (defun bar (x)
-      (print x))
-    (let ((bar0 #'bar))
-      (setf (fdefinition 'bar)
-       (lambda (&rest rest)
-         (format t "~&about to enter BAR ~S~%" rest)
-         (apply bar0 rest)
-         (format t "~&back from BAR~%"))))
-    (bar 12)
-  recurses endlessly in sbcl-0.7.9.32. (Or it works if #' and 
-  FDEFINITION are replaced by SYMBOL-FUNCTION.)
+  Type check for INTEGER, the result of which serves as the first
+  argument of M-V-C, is inserted after evaluation of NIL. So arguments
+  of M-V-C are pushed in the wrong order. As a temporary workaround
+  type checking was disabled for M-V-Cs in 0.7.9.13. A better solution
+  would be to put the check between evaluation of arguments, but it
+  could be tricky to check result types of PROG1, IF etc.
+
+228: "function-lambda-expression problems"
+  in sbcl-0.7.9.6x, from the REPL:
+    * (progn (declaim (inline foo)) (defun foo (x) x))
+    FOO
+    * (function-lambda-expression #'foo)
+    (SB-C:LAMBDA-WITH-LEXENV NIL NIL NIL (X) (BLOCK FOO X)), NIL, FOO
+  but this first return value is not suitable for input to FUNCTION or
+  COMPILE, as required by ANSI.
+
+229:
+  (subtypep 'function '(function)) => nil, t.
+
+233:
+  Bug in constraint propagation:
+
+  (defun foo (x)
+    (declare (optimize (speed 2) (safety 3)))
+    (let ((y 0d0))
+      (values
+       (the double-float x)
+       (setq y (+ x 1d0))
+       (setq x 3d0)
+       (quux y (+ y 2d0) (* y 3d0)))))
+  (foo 4) => segmentation violation
+
+  (see usage of CONTINUATION-ASSERTED-TYPE in USE-RESULT-CONSTRAINTS)
+
+234:
+  clocc-ansi-test :EXCEPSIT-LEGACY-1277 fails in sbcl-0.7.10.33
+
+  In sbcl-0.7.10.33 (but not ca. 0.7.10.29), 
+    (defclass foo54 () ())
+    (reinitialize-instance (make-instance 'foo54) :dummy 0)
+  does not signal an error. ANSI's definition of REINITIALIZE-INSTANCE
+  says
+    The system-supplied primary method for REINITIALIZE-INSTANCE signals
+    an error if an initarg is supplied that is not declared as valid.
+  and defines what that means in 
+    7.1.2 Declaring the Validity of Initialization Arguments
+  In effect, even though the signature shown for the REINITIALIZE-INSTANCE
+  gf in its ANSI definition page is &ALLOW-OTHER-KEYS, and that might
+  make it look as though anything goes, the gf+methods ensemble is required
+  to have more complicated &KEY-checking behavior than that.
 
 DEFUNCT CATEGORIES OF BUGS
   IR1-#: