From 86ca707c11b05a6cd17a26223e1a6c936b0b83c0 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 27 Oct 2013 14:49:42 -0700 Subject: Fix 2013-10-06 regression in op syntax. This happens when a @var syntax appears in an op form, crashing the expander with infinite recursion at program load time, before the code is run. * eval.c (transform_op): The fi == var check to handle a trailing op variable in the dot position of a form needs to ensure that it really is @ type var, and not the @ type for instance. --- ChangeLog | 11 +++++++++++ eval.c | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 626b741d..e2142e02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2013-10-27 Kaz Kylheku + + Fix 2013-10-06 regression in op syntax. This happens when a @var + syntax appears in an op form, crashing the expander with infinite + recursion at program load time, before the code is run. + + * eval.c (transform_op): The fi == var check to handle a + trailing op variable in the dot position of a form + needs to ensure that it really is @ type var, and + not the @ type for instance. + 2013-10-27 Kaz Kylheku Fix jaw-dropping bug introduced on 2009-11-15, first affecting diff --git a/eval.c b/eval.c index 1471e9be..162b0c91 100644 --- a/eval.c +++ b/eval.c @@ -1506,7 +1506,9 @@ static val transform_op(val forms, val syms, val rg) val fi = first(forms); val re = rest(forms); - if (fi == var_s) { + /* This handles improper list forms like (a b c . @42) + when the recursion hits the @42 part. */ + if (fi == var_s && integerp(car(re))) { cons_bind (outsyms, outforms, transform_op(cons(forms, nil), syms, rg)); return cons(outsyms, rlcp(car(outforms), outforms)); } -- cgit v1.2.3