Re: Build failure on FreeBSD/PowerPC 32-bit

Douglas Katzman via Sbcl-help <[email protected]> Fri, 10 Jan 2025 13:00:59 -0500
Newsgroups gmane.lisp.steel-bank.general
Message-ID <CAOrNaswm+nD0zBV7U_Rd_=UTuBqcE35fv8=+Vb-G_-yAnw+pag@mail.gmail.com>
There are actually two things going wrong in that backtrace, not just the
type error.
But I just built ppc32 on linux to confirm that it's not completely broken
in the manner shown above, and it worked fine.
At best I can only give some hints about trying to debug this crash because
in neither case could I see it being related to the OS

First: TOPOLOGICAL-SORT creates its hash such that it should never resize.
It would call GROW-HASH-TABLE only if some pair in constraints had either a
car or cdr not in objects. I further convinced myself of this by adding an
assertion just before the RETURN:
(aver (<= (hash-table-count obj-info) (length objects)))
Therefore one question you may want to try to get an answer to is why some
(setf (gethash ..)) resized. You could add a length check on the key/value
vector to see if it grew after any given call. The vector can be seen
thusly:
 (sb-impl::hash-table-pairs (make-hash-table :size 14)) => #(0 0 #<unbound>
#<unbound> #<unbound> #<unbound> #<unbound> #<unbound> ...)
Second: I would guess that the table's rehash-size slot is messed up and
does not contain a single-precision float.  You could try printing the
hash-table from the ldb prompt using the 'p' command and the address of the
table. To find the tables, I added some output thusly-

--- a/src/code/class.lisp
+++ b/src/code/class.lisp
@@ -522,6 +522,9 @@ between the ~A definition and the ~A definition"
   (let ((obj-info (make-hash-table :size (length objects)))
         (free-objs nil)
         (result nil))
+    #-sb-xc-host
+    (format t "~&topsort: ~d objects ~d constraints, ht=~x~%"
+          (length objects) (length constraints) (get-lisp-obj-address
obj-info))
     (loop for (obj1 . obj2) in constraints do
        (incf (first (ensure-gethash obj2 obj-info (list 0))))
        (push obj2 (rest (ensure-gethash obj1 obj-info (list 0)))))

_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help