0.8.10.64:
[sbcl.git] / BUGS
diff --git a/BUGS b/BUGS
index 16b98ce..e5b063c 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -736,7 +736,6 @@ WORKAROUND:
   all of the arguments are circular is probably desireable).
 
 213: "Sequence functions and type checking"
-  a. (fixed in 0.8.4.36)
   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
@@ -1087,39 +1086,6 @@ WORKAROUND:
 
  (see also bug 117)
 
-280: bogus WARNING about duplicate function definition 
-  In sbcl-0.8.3 and sbcl-0.8.1.47, if BS.MIN is defined inline,
-  e.g. by 
-     (declaim (inline bs.min))
-     (defun bs.min (bases) nil)
-  before compiling the file below, the compiler warns
-     Duplicate definition for BS.MIN found in one static
-     unit (usually a file).
-  when compiling 
-    (declaim (special *minus* *plus* *stagnant*))
-    (defun b.*.min (&optional (x () xp) (y () yp) &rest rest)
-      (bs.min avec))
-    (define-compiler-macro b.*.min (&rest rest)
-      `(bs.min ,@rest))
-    (defun afish-d-rbd (pd)
-      (if *stagnant* 
-          (b.*.min (foo-d-rbd *stagnant*))
-          (multiple-value-bind (reduce-fn initial-value)
-              (etypecase pd
-                (list (values #'bs.min 0))
-                (vector (values #'bs.min *plus*)))
-            (let ((cv-ks (cv (kpd.ks pd))))
-              (funcall reduce-fn d-rbds)))))
-    (defun bfish-d-rbd (pd)
-      (if *stagnant* 
-          (b.*.min (foo-d-rbd *stagnant*))
-          (multiple-value-bind (reduce-fn initial-value)
-              (etypecase pd
-                (list (values #'bs.min *minus*))
-                (vector (values #'bs.min 0)))
-            (let ((cv-ks (cv (kpd.ks pd))))
-              (funcall reduce-fn d-rbds)))))
-
 281: COMPUTE-EFFECTIVE-METHOD error signalling.
   (slightly obscured by a non-0 default value for
    SB-PCL::*MAX-EMF-PRECOMPUTE-METHODS*)
@@ -1331,21 +1297,6 @@ WORKAROUND:
   spurious errors should two threads attempt to tokenise at the same
   time.
 
-312:
-  (reported by Jon Dyte)
-  SBCL issues a warning "Duplicate definition of FOO" compiling
-
-    (declaim (inline foo))
-    (defun foo (x)
-      (1+ x))
-    (defun bar (y)
-      (list (foo y) (if (> y 1) (funcall (if (> y 0) #'foo #'identity) y))))
-
-  (probably related to the bug 280.)
-
-313: "source-transforms are Lisp-1"
-  (fixed in 0.8.10.2)
-
 314: "LOOP :INITIALLY clauses and scope of initializers"
   reported by Bruno Haible sbcl-devel "various SBCL bugs" from CLISP
   test suite, originally by Thomas F. Burdick.
@@ -1374,22 +1325,20 @@ WORKAROUND:
         (adjust-array x '(5))
         (char y 5)))
 
-  SBCL 0.8.10 elides the bounds check somewhere along the line, and
-  returns #\Nul (where an error would be much preferable, since a test
-  of that form but with (setf (char y 5) #\Space) potentially corrupts
-  the heap and certainly confuses the world if that string is used by
-  C code.
+  SBCL fails this because (array-dimension y 0) return 10 even after the
+  adjustment, and hence the bounds-check passes. This is strictly
+  speaking legal, since the dictionary entry for ADJUST-ARRAY
+  says:
 
-316: "SHIFTF and multiple values"
-  reported by Bruno Haible sbcl-devel "various SBCL bugs" from CLISP
-  test suite.
-    (shiftf (values x y) (values y x))
-  gives an error in sbcl-0.8.10.
+    "If A is displaced to B, the consequences are unspecified if B is
+    adjusted in such a way that it no longer has enough elements to
+    satisfy A."
 
-  Parts of the explanation of SHIFTF in ANSI CL talk about multiple
-  store variables, and the X3J13 vote
-  SETF-MULTIPLE-STORE-VARIABLES:ALLOW also says that SHIFTF should
-  support multiple value places.
+  Should this be left as is, or should ARRAY-DIMENSION see if the
+  displaced-to array has shrunk too much and signal an error? An error
+  would probably be preferable, since a test of that form but with
+  (setf (char y 5) #\Space) potentially corrupts the heap and
+  certainly confuses the world if that string is used by C code.
 
 317: "FORMAT of floating point numbers"
   reported by Bruno Haible sbcl-devel "various SBCL bugs" from CLISP
@@ -1422,48 +1371,6 @@ WORKAROUND:
     #(1 2 ((SB-IMPL::|,|) + 2 2) 4)
   which probably isn't intentional.
 
-320: "shared to local slot in class redefinition"
-  reported by Bruno Haible sbcl-devel "various SBCL bugs" from CLISP
-  test suite.
-    ;; Shared slot becomes local.
-    ;; 4.3.6.1.: "The value of a slot that is specified as shared in
-    ;; the old class and as local in the new class is retained."
-    (multiple-value-bind (value condition)
-        (ignore-errors
-          (defclass foo85a () 
-            ((size :initarg :size :initform 1 :allocation :class)))
-          (defclass foo85b (foo85a) ())
-          (setq i (make-instance 'foo85b))
-          (defclass foo85a () ((size :initarg :size :initform 2) (other)))
-          (slot-value i 'size))
-      (list value (type-of condition)))
-  should return (1 NULL) but returns (2 NULL) in sbcl-0.8.10.  See
-  ensuing discussion sbcl-devel for how to deal with this.
-
-321: "DEFINE-METHOD-COMBINATION lambda list parsing"
-  reported by Bruno Haible sbcl-devel "various SBCL bugs" from CLISP
-  test suite.
-    (define-method-combination w-args ()
-      ((method-list *))
-      (:arguments arg1 arg2 &aux (extra :extra))
-     `(progn ,@(mapcar (lambda (method) `(call-method ,method)) method-list)))
-  gives a (caught) compile-time error, which can be exposed by
-    (defgeneric mc-test-w-args (p1 p2 s)
-      (:method-combination w-args)
-      (:method ((p1 number) (p2 t) s)
-        (vector-push-extend (list 'number p1 p2) s))
-      (:method ((p1 string) (p2 t) s)
-        (vector-push-extend (list 'string p1 p2) s))
-      (:method ((p1 t) (p2 t) s) (vector-push-extend (list t p1 p2) s)))
-
-322: "DEFSTRUCT :TYPE LIST predicate and improper lists"
-  reported by Bruno Haible sbcl-devel "various SBCL bugs" from CLISP
-  test suite.
-    (defstruct (a (:type list) (:initial-offset 5) :named))
-    (defstruct (b (:type list) (:initial-offset 2) :named (:include a)))
-    (b-p (list* nil nil nil nil nil 'foo73 nil 'tail))
-  gives an error in sbcl-0.8.10
-
 323: "REPLACE, BIT-BASH and large strings"
   The transform for REPLACE on simple-base-strings uses BIT-BASH, which
   at present has an upper limit in size.  Consequently, in sbcl-0.8.10
@@ -1484,3 +1391,69 @@ WORKAROUND:
   to about 1024 (and similarly for signed-byte), so
     (open "/dev/zero" :element-type '(unsigned-byte 1025))
   gives an error in sbcl-0.8.10.
+
+325: "CLOSE :ABORT T on supeseding streams"
+  Closing a stream opened with :IF-EXISTS :SUPERSEDE with :ABORT T leaves no
+  file on disk, even if one existed before opening.
+
+  The illegality of this is not crystal clear, as the ANSI dictionary
+  entry for CLOSE says that when :ABORT is T superseded files are not
+  superseded (ie. the original should be restored), whereas the OPEN
+  entry says about :IF-EXISTS :SUPERSEDE "If possible, the
+  implementation should not destroy the old file until the new stream
+  is closed." -- implying that even though undesirable, early deletion
+  is legal. Restoring the original would none the less be the polite
+  thing to do.
+
+326: "*PRINT-CIRCLE* crosstalk between streams"
+  In sbcl-0.8.10.48 it's possible for *PRINT-CIRCLE* references to be
+  mixed between streams when output operations are intermingled closely
+  enough (as by doing output on S2 from within (PRINT-OBJECT X S1) in the
+  test case below), so that e.g. the references #2# appears on a stream
+  with no preceding #2= on that stream to define it (because the #2= was
+  sent to another stream).
+    (cl:in-package :cl-user)
+    (defstruct foo index)
+    (defparameter *foo* (make-foo :index 4))
+    (defstruct bar)
+    (defparameter *bar* (make-bar))
+    (defparameter *tangle* (list *foo* *bar* *foo*))
+    (defmethod print-object ((foo foo) stream)
+      (let ((index (foo-index foo)))
+        (format *trace-output*
+           "~&-$- emitting FOO ~D, ambient *BAR*=~S~%"
+           index *bar*)
+        (format stream "[FOO ~D]" index))
+      foo)
+    (let ((tsos (make-string-output-stream))
+          (ssos (make-string-output-stream)))
+      (let ((*print-circle* t)
+       (*trace-output* tsos)
+       (*standard-output* ssos))
+        (prin1 *tangle* *standard-output*))
+      (let ((string (get-output-stream-string ssos)))
+        (unless (string= string "(#1=[FOO 4] #S(BAR) #1#)")
+          ;; In sbcl-0.8.10.48 STRING was "(#1=[FOO 4] #2# #1#)".:-(
+          (error "oops: ~S" string))))
+  It might be straightforward to fix this by turning the
+  *CIRCULARITY-HASH-TABLE* and *CIRCULARITY-COUNTER* variables into
+  per-stream slots, but (1) it would probably be sort of messy faking
+  up the special variable binding semantics using UNWIND-PROTECT and
+  (2) it might be sort of a pain to test that no other bugs had been
+  introduced. 
+
+327: "Lazy construction of CLOS classes from system classoids"
+  In a fresh SBCL,
+    (sb-mop:class-direct-subclasses (find-class 'pathname))
+  returns NIL, despite the LOGICAL-PATHNAME class existing.  However,
+  if we then do (find-class 'logical-pathname) and repeat the request
+  for direct subclasses, a list of the logical pathname class is
+  returned.  (Though this particular example revealed the problem to
+  CSR, others have found that this gave consistent results for
+  PATHNAME, but not for SIMPLE-CONDITION.)
+
+  Presumably the CLOS bootstrap process needs to iterate over
+  classoids (both structure- and condition-) to create CLOS classes
+  for them, so that this internal inconsistency does not arise?  How
+  does this interact with the classoid hierarchy not perfectly
+  mirroring the class hierarchy?  (e.g. INSTANCE?)