Hello,
The following commands makes CLIPS to crash.
CLIPS (6.4.1 4/8/23)
CLIPS> (defmethod foo 1 ())
CLIPS> (defmethod foo ()
(bind ?a 1))
CLIPS> (foo)
Segmentation fault (core dumped)
The patch below seems to fix this problem
diff -u core/genrcpsr.c mine/genrcpsr.c
--- core/genrcpsr.c 2017-10-11 23:43:28.000000000 +0900
+++ mine/genrcpsr.c 2023-04-30 21:13:02.091655570 +0900
@@ -499,13 +499,13 @@
meth->actions = actions;
ExpressionInstall(theEnv,meth->actions);
meth->header.ppForm = ppForm;
+ meth->localVarCount = lvars;
if (mposn == -1)
{
RestoreBusyCount(gfunc);
return(meth);
}
- meth->localVarCount = lvars;
meth->restrictionCount = rcnt;
if (wildcard != NULL)
Thanks.
Patch checked into repository for 6.4x and 6.3x branches.