failed AVER: (NOT (PLUSP SB-C::TODO))

Bug #1889393 reported by Paul F. Dietz on 2020-07-29
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Undecided
Unassigned

Bug Description

(compile
 nil
 '(lambda (name x)
   (let* ((v1
            (if (rest x)
                `((instance ,name (and ,@(mapcar #'car x))))
                `((instance ,name ,(car (first x)))))))
     (declare (dynamic-extent v1))
     (f v1))))

==>

failed AVER: (NOT (PLUSP SB-C::TODO))
This is probably a bug in SBCL itself. (Alternatively, SBCL
might have been corrupted by bad user code, e.g. by an undefined
Lisp operation like (FMAKUNBOUND 'COMPILE), or by stray pointers
from alien code or from unsafe Lisp code; or there might be a
bug in the OS or hardware that SBCL is running on.) If it seems
to be a bug in SBCL itself, the maintainers would like to know
about it. Bug reports are welcome on the SBCL mailing lists,
which you can find at <http://sbcl.sourceforge.net/>.
   [Condition of type SB-INT:BUG]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "new-repl-thread" RUNNING {10350E34F3}>)

Backtrace:
  0: (SB-C::ORDER-UVL-SETS #<SB-C:COMPONENT :NAME (LAMBDA (NAME X)) {1035116413}>)
  1: (SB-C::STACK-ANALYZE #<SB-C:COMPONENT :NAME (LAMBDA (NAME X)) {1035116413}>)
  2: (SB-C::%COMPILE-COMPONENT #<SB-C:COMPONENT :NAME (LAMBDA (NAME X)) {1035116413}>)

Stas Boukarev (stassats) wrote :

(defun foo (f x)
  (let ((l (if x
               (list (cons 1 2)))))
    (declare (dynamic-extent l))
    (funcall f l)))

Changed in sbcl:
status: New → Confirmed
Stas Boukarev (stassats) wrote :

Although that gives a different error,
(defun foo (f x)
  (let ((l (if x
               (list (mapcar #'car x))
               (list (list x)))))
    (declare (dynamic-extent l))
    (funcall f l)))

but they are probably caused by the same thing.

Stas Boukarev (stassats) wrote :

Actually different. Further reduced to
(defun foo (x z)
  (let ((l (if x
               (tagbody
                m
                  (if z
                      (go m)))
               (list (list 1)))))
    (declare (dynamic-extent l))
    (print l)
    1))

Stas Boukarev (stassats) on 2020-08-01
Changed in sbcl:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers