Another dynamic extent bug (failed AVER)

Bug #1739308 reported by Paul F. Dietz on 2017-12-19
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

(defun f52 (x)
  (let ((*s*
         (list (list x)
               (catch 'ct1
                 (block b2
                     (throw 'ct8 30)))))
    (declare (special *s*) (dynamic-extent *s*))))



Note: this is not a malformed code bug.

description: updated
Stas Boukarev (stassats) on 2017-12-19
Changed in sbcl:
status: New → Triaged
importance: Undecided → High

Two variants, both exemplifying the same bug:

(defun f52a (x)
  (let ((*s*
         (multiple-value-prog1 (list x)
           (catch 'ct1
             (throw 'ct8 30)))))
    (declare (special *s*) (dynamic-extent *s*))))

(defun f52b (x y)
  (let ((s
         (multiple-value-prog1 (list x)
           (catch 'ct1
             (throw 'ct8 30)))))
    (declare (dynamic-extent s))
    (funcall (truly-the function y) s)))

The THROW doesn't return, but the CATCH entry is still live (yes, it is possible to set up a context where control leaves via the THROW and ends up at the CATCH), and is the only path back from the "entry DX" for S or *S*. BACK-PROPAGATE-DX-LVARS can't see through the entry to its allocator, though, so it finds no path to (LIST X), and thus the LVAR doesn't get back-propagated anywhere.

Fixed in 6eb755deadbfd2df3e1f54c891e8ef331f176076.

Changed in sbcl:
status: Triaged → Fix Committed
Stas Boukarev (stassats) on 2017-12-29
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers