From 3005bda72a3eb14fc94225c3fd399cec98443a1c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 24 Aug 2016 06:55:45 -0700 Subject: Error on non-bindable sym in defvar and defparm. * eval.c (me_def_variable): Check for sym not being a bindable symbol. Otherwise we might call mark_special on nil, which triggers an assertion. --- eval.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eval.c b/eval.c index 36c07890..07d8c5cd 100644 --- a/eval.c +++ b/eval.c @@ -2365,6 +2365,9 @@ static val me_def_variable(val form, val menv) if (op != defvar_s && length(args) != two) eval_error(form, lit("~s: two arguments expected"), op, nao); + if (!bindable(sym)) + eval_error(form, lit("~s: ~s is not a bindable symbol"), op, sym, nao); + if (op == defparm_s || op == defvar_s) mark_special(sym); -- cgit v1.2.3