Steel Bank Common Lisp

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

Reported by Dalek Baldwin on 2013-01-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
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.

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) on 2013-01-15
Changed in sbcl:
status: New → Confirmed
importance: Undecided → Low

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  Edit
Everyone can see this information.

Other bug subscribers