Another dynamic extent bug (failed AVER)
Bug #1739308 reported by
Paul F. Dietz
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
High
|
Unassigned |
Bug Description
(defun f52 (x)
(let ((*s*
(list (list x)
))
(declare (special *s*) (dynamic-extent *s*))))
==>
failed AVER: (SUBSETP SB-C::END SB-C::END-STACK)
Note: this is not a malformed code bug.
description: | updated |
Changed in sbcl: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Two variants, both exemplifying the same bug:
(defun f52a (x)
(multiple- value-prog1 (list x)
(let ((*s*
(catch 'ct1
(throw 'ct8 30)))))
(declare (special *s*) (dynamic-extent *s*))))
(defun f52b (x y)
(multiple- value-prog1 (list x)
(let ((s
(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.