gray streams randomly disappear from subclassoids of classoid T

Bug #1956878 reported by Douglas Katzman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
New
Undecided
Unassigned

Bug Description

Applying the following diff to 'tests/bivalent-stream.impure.lisp' shows that stream classoids seem to go missing.

--- a/tests/bivalent-stream.impure.lisp
+++ b/tests/bivalent-stream.impure.lisp
@@ -17,6 +17,19 @@

 ;;; Test character decode restarts.

+(defun find-in-subclassoids-of-t ()
+ (format t "~&Hi: ~S~%"
+ (mapcar (lambda (x)
+ (cons (sb-kernel:find-classoid x nil)
+ (gethash (sb-kernel:find-classoid x nil)
+ (sb-kernel:classoid-subclasses
+ (sb-kernel:find-classoid 'standard-object)))))
+ '(sb-gray:FUNDAMENTAL-BINARY-STREAM
+ sb-gray:FUNDAMENTAL-CHARACTER-STREAM
+ sb-gray:FUNDAMENTAL-OUTPUT-STREAM
+ sb-gray:FUNDAMENTAL-BINARY-OUTPUT-STREAM
+ sb-gray:FUNDAMENTAL-BINARY-INPUT-STREAM))))
+
 (defun bvector (&rest elements)
   (make-array (length elements) :element-type '(unsigned-byte 8)
               :initial-contents elements))
@@ -160,6 +173,8 @@
             (stream (make-synonym-stream '*synonym-stream-stream*)))
        (do-reads stream *read/write-sequence-pairs*)))))

+(find-in-subclassoids-of-t)
+
 (with-test (:name (stream :bivalent :roundtrip sequence broadcast-stream))
   (with-bivalent-io-setup ("bivalent-stream-test.txt")
     ;; Write sequence.
@@ -170,6 +185,8 @@
     (with-stream (stream :direction :input)
       (do-reads stream *read/write-sequence-pairs*))))

+(find-in-subclassoids-of-t)
+

./run-tests.sh bivalent-stream.impure.lisp
::: Running (STREAM :BIVALENT :ROUNDTRIP :ELEMENT)
::: Success (STREAM :BIVALENT :ROUNDTRIP :ELEMENT)
::: Running (STREAM :BIVALENT :ROUNDTRIP SEQUENCE)
::: Success (STREAM :BIVALENT :ROUNDTRIP SEQUENCE)
::: Running (STREAM :BIVALENT :ROUNDTRIP SEQUENCE SYNONYM-STREAM)
::: Success (STREAM :BIVALENT :ROUNDTRIP SEQUENCE SYNONYM-STREAM)
Hi: ((#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-BINARY-STREAM>
      . #<SB-KERNEL:WRAPPER (ID=377) for FUNDAMENTAL-BINARY-STREAM {908F2B1}>)
     (#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-CHARACTER-STREAM>
      . #<SB-KERNEL:WRAPPER (ID=449) for FUNDAMENTAL-CHARACTER-STREAM {908F231}>)
     (#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-OUTPUT-STREAM>
      . #<SB-KERNEL:WRAPPER (ID=422) for FUNDAMENTAL-OUTPUT-STREAM {908F1B1}>)
     (#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-BINARY-OUTPUT-STREAM>
      . #<SB-KERNEL:WRAPPER (ID=446) for FUNDAMENTAL-BINARY-OUTPUT-STREAM {908F3B1}>)
     (#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-BINARY-INPUT-STREAM>
      . #<SB-KERNEL:WRAPPER (ID=445) for FUNDAMENTAL-BINARY-INPUT-STREAM {908F331}>))
::: Running (STREAM :BIVALENT :ROUNDTRIP SEQUENCE BROADCAST-STREAM)
::: Success (STREAM :BIVALENT :ROUNDTRIP SEQUENCE BROADCAST-STREAM)
Hi: ((#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-BINARY-STREAM>)
     (#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-CHARACTER-STREAM>)
     (#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-OUTPUT-STREAM>)
     (#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-BINARY-OUTPUT-STREAM>)
     (#<SB-KERNEL:STANDARD-CLASSOID FUNDAMENTAL-BINARY-INPUT-STREAM>))

So they exist, but they're not subclassoids of T. How can that be?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.