Repository navigation
Commit 6f85011
committed
Fix number of values being broken by unwind-protect cleanup
The new direct values code neglected to reset the number of values
in the thread-local values, so whatever a cleanup did would be
kept in the event of a nonlocal exit. Reproducer:
(defun reproduce (cleanup)
(block done
(multiple-value-bind (body status headers)
(values :body 200 :headers)
(unwind-protect
(return-from done
(values-list (list body status headers :uri nil)))
(funcall cleanup)))))
(loop for cleanup in
(list (lambda () (values))
(lambda () (values :one))
(lambda () (values :one :two)))
collect (multiple-value-list (reproduce cleanup)))
should return (:body 200 :headers) three times, did return
() (:body) (:body 200) as per the cleanup values.
This is all in native code obviously.1 parent 75f77bb commit 6f85011
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
224 | 225 | | |
225 | 226 | | |
226 | 227 | | |
| |||
0 commit comments