make-instance: circular lists in initargs cause infinite loop in let binding

Bug #1099708 reported by Dalek Baldwin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Low
Unassigned

Bug Description

;; SBCL 1.0.58

(defclass a-lisp-object ()
  ((a-slot
    :accessor a-slot
    :initarg :a-slot)))

(let ((foo (make-instance 'a-lisp-object :a-slot '#1=(a b . #1#)))))

(let ((foo (make-instance 'a-lisp-object :a-slot '#1=(a b . #1#)))))

The first let expression finishes and returns nil, but the second one goes into an infinite loop.

Revision history for this message
3b (00003b) wrote :

looks like a problem with the compiler-macro for MAKE-INSTANCE.
SB-PCL::MAKE-INSTANCE->CONSTRUCTOR-CALL uses the initargs to build a function name, so second call looks up that name in the environment, then breaks when VOLATILE-INFO-LOOKUP tries to compare the circular list in the names with EQUAL.

looks like it was inherited from cmucl in version 0.7.10.31 or so

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Christophe Rhodes (csr21-cantab) wrote : Re: [Bug 1099708] [NEW] make-instance: circular lists in initargs cause infinite loop in let binding

Dalek Baldwin <email address hidden> writes:

> The first let expression finishes and returns nil, but the second one
> goes into an infinite loop.

So it does. Can you try the patch which hopefully will be attached to
this bug once this message is processed? (It's been a while since I've
used this interface).

Christophe

Changed in sbcl:
status: Confirmed → Fix Released
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.