0.7.9.52:
[sbcl.git] / BUGS
diff --git a/BUGS b/BUGS
index af0d847..c3ad6f9 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -382,6 +382,9 @@ WORKAROUND:
   LOAD-FOREIGN, and (2) hunt for any other code which uses temporary
   files and make it share the same new safe logic.
 
+  (partially alleviated in sbcl-0.7.9.32 by a fix by Matthew Danish to
+   make the temporary filename less easily guessable)
+
 82: 
   Functions are assigned names based on the context in which they're
   defined. This is less than ideal for the functions which are
@@ -519,6 +522,40 @@ WORKAROUND:
     internal error, failed AVER:
       "(COMMON-LISP:EQ (SB!C::TN-ENVIRONMENT SB!C:TN) SB!C::TN-ENV)"
 
+  This examples better illustrates the problem:
+
+  (defun tst ()
+    (declare (optimize (speed 2) (debug 3)))
+    (flet ((m1 ()
+             (bar (if (foo) 1 2))
+             (let ((x (foo)))
+               (bar x (list x)))))
+      (if (catch nil)
+          (m1)
+          (m1))))
+
+  (X is allocated in the physical environment of M1; X is :WRITE in
+  the call of LET [convert-to-global]; IF makes sure that a block
+  exists in M1 before this call.)
+
+  Because X is :DEBUG-ENVIRONMENT, it is :LIVE by default in all
+  blocks in the environment, particularly it is :LIVE in the start of
+  M1 (where it is not yet :WRITE) [setup-environment-tn-conflicts].
+
+  Then :LIVE is propagated backwards, i.e. into the caller of M1
+  where X does not exist [lifetime-flow-analysis].
+
+  (CATCH NIL) causes all TNs to be saved; Python fails on saving
+  non-existent variable; if it is replaced with (FOO), the problem
+  appears when debugging TST: LIST-LOCALS says
+
+    debugger invoked on condition of type SB-DI:UNKNOWN-DEBUG-VAR:
+
+    #<SB-DI::COMPILED-DEBUG-VAR X 0
+      {905FF7D}> is not in #<SB-DI::COMPILED-DEBUG-FUNCTION TST>.
+
+  (in those old versions, in which debugger worked :-().
+
 117:
   When the compiler inline expands functions, it may be that different
   kinds of return values are generated from different code branches.
@@ -649,15 +686,6 @@ 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:
@@ -795,14 +823,6 @@ WORKAROUND:
   macro is unhappy with the illegal syntax in the method body, and
   is giving an unclear error message.
 
-172:
-  sbcl's treatment of at least macro lambda lists is too permissive;
-  e.g., in sbcl-0.7.3.7:
-    (defmacro foo (&rest rest bar) `(,bar ,rest))
-    (macroexpand '(foo quux zot)) -> (QUUX (QUUX ZOT))
-  whereas section 3.4.4 of the CLHS doesn't allow required parameters
-  to come after the rest argument.
-
 173:
   The compiler sometimes tries to constant-fold expressions before
   it checks to see whether they can be reached. This can lead to 
@@ -993,25 +1013,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, 
@@ -1019,11 +1020,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).
@@ -1123,7 +1124,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))
@@ -1143,7 +1144,7 @@ WORKAROUND:
 
        ; in: LAMBDA NIL
        ;     (FOO :Y 1 :Y 2)
-       ; 
+       ;
        ; caught STYLE-WARNING:
        ;   The variable #:G15 is defined but never used.
 
@@ -1153,14 +1154,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)
@@ -1173,7 +1174,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.
@@ -1251,7 +1252,7 @@ WORKAROUND:
 219: "DEFINE-COMPILER-MACRO in non-toplevel contexts evaluated at compile-time"
   In sbcl-0.7.9:
 
-  * (defun foo (x) 
+  * (defun foo (x)
       (when x
         (define-compiler-macro bar (&whole whole)
           (declare (ignore whole))
@@ -1265,7 +1266,7 @@ WORKAROUND:
   * (baz t)
   1
 
-220: 
+220:
   Sbcl 0.7.9 fails to compile
 
   (multiple-value-call #'list
@@ -1280,6 +1281,72 @@ WORKAROUND:
   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.)
+
+224:
+  SBCL 0.7.8 fails to compile
+
+  (localy (declare (optimize (safety 3)))
+          (ignore-errors (progn (values-list (car (list '(1 . 2)))) t)))
+
+225:
+  (fixed in 0.7.9.42)
+
+226: "AVER failure in COMPILE-FILE of clocc-ansi-test/tests.lisp"
+  sbcl-0.7.9.43 dies with failed AVER "(EQ (TN-PHYSENV TN) TN-ENV)" when
+  trying to compile clocc-ansi-test/tests.lisp. sbcl-0.7.9.31 was able to
+  to compile it. A smaller test case exhibiting the same problem is
+   (declaim (optimize (speed 0) (safety 3) (debug 3)))
+   (defun c-a-p ()
+     (flet ((safe-format (stream string &rest r)
+              (unless (ignore-errors (progn
+                                       (apply #'format stream string r)
+                                       t))
+               (format stream "~&foo ~S" string))))
+       (cond
+        ((eq my-result :ERROR)
+         (cond
+          ((ignore-errors (typep condition result))
+           (safe-format t "~&bar ~S" result))
+          (t
+           (safe-format t "~&baz ~S (~A) ~S" condition condition result)))))))
+
 
 DEFUNCT CATEGORIES OF BUGS
   IR1-#: