error in convert-mv-call
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
(flet ((k (&rest x) (declare (ignore x)) 0)) (multiple-
fails with
failed AVER: (NOT (FUNCTIONAL-
Repored by Larry D'Anna on sbcl-devel, along with the following diagnosis and fix:
Fix convert-mv-call so it doesn't crash on the following input
(flet ((k (&rest x) (declare (ignore x)) 0)) (multiple-
Specifically, so it doesn't trigger (aver (not (functional-
This aver was inserted in version 0.8.5.5 by Alexey Dejneka.
> 0.8.5.5:
> * Fix bug reported by Brian Downing: do not perform
> MV-LET-convertion, if the last optional entry has
> references.
Ever since Spice Lisp, convert-mv-call had returned without doing anything if
(functional-
replaces this criterion with "if the last optional entry has references", and
signals an error if the last optional entry has no references and the XEP
exists.
I can't know exactly what Alexy was thinking when he put the aver in, but I can
guess: If the XEP exists it should contain a reference to the last entry point,
so if the last entry point has no refs and a XEP exists something went wrong.
However, if the number of required + optional arguments is 0, then XEP doesn't
need the "last" entry point, it can always use the "more" entry point instead,
which is exactly what seems to have happened in this case.
This patch combines the two conditions. convert-mv-call will return without
action if *either* a XEP exists, *or* the last optional entry has references.
---
src/compiler/
1 files changed, 2 insertions(+), 2 deletions(-)
mode change 100644 => 100755 run-sbcl.sh
diff --git a/run-sbcl.sh b/run-sbcl.sh
old mode 100644
new mode 100755
diff --git a/src/compiler/
index ed3e34f..e3a8245 100644
--- a/src/compiler/
+++ b/src/compiler/
@@ -533,13 +533,13 @@
(declare (type ref ref) (type mv-combination call) (type functional fun))
(when (and (looks-
- (singleton-p (basic-
+ (singleton-p (basic-
+ (not (functional-
(let* ((*current-
(ep (optional-
fun (optional-
(when (null (leaf-refs ep))
(aver (= (optional-
- (aver (not (functional-
(setf (basic-
Changed in sbcl: | |
status: | Confirmed → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |