Help with kill bug in CMUCL



The rtest12 test fails on CMUCL, but not with any other Lisp I have
tried. I am having difficulty pinning down the bug, but I think it
involves "kill". Since the bug only appears under CMUCL, it is possible
that it is a bug in CMUCL. Even if that is true, I haven't been able to
isolate the problem in the maxima code. I would really appreciate some
help on this one. 

Here is the simplest example I can find. 

---- begin bug.mac -----
/* show default list of rules */
rules;
/* add a new rule */
tellsimp(f(x),g(x));
/* verify that a new rule has been added to the list of rules */
rules;
/* restore the default rules */
kill(rules);
/* show the current set of rules */
rules;
/* redefine our "new" rule */
tellsimp(f(x),g(x));
----- end bug.mac -----

Running bug.mac with clisp produces the correct result:
------------------------------------------------------------------------
|abacus>./maxima-local --lisp=clisp --batch=bug.mac 
Maxima 5.9.0pre-cvs (with enhancements by W. Schelter).
Licensed under the GNU Public License (see file COPYING)
(C1) 

batching /home/amundson/notwork/maxima/maxima/bug.mac
(C2) 				     RULES
(D2) [TRIGRULE0, TRIGRULE1, TRIGRULE2, TRIGRULE3, TRIGRULE4, HTRIGRULE1,

					    HTRIGRULE2, HTRIGRULE3, HTRIGRULE4]
(C3) 			     TELLSIMP(f(x), g(x))
(D3) 			        [fRULE1, FALSE]
(C4) 				     RULES
(D4) [TRIGRULE0, TRIGRULE1, TRIGRULE2, TRIGRULE3, TRIGRULE4, HTRIGRULE1,

				    HTRIGRULE2, HTRIGRULE3, HTRIGRULE4, fRULE1]
(C5) 				  KILL(RULES)
(D5) 				     DONE
(C6) 				     RULES
(D6) [TRIGRULE0, TRIGRULE1, TRIGRULE2, TRIGRULE3, TRIGRULE4, HTRIGRULE1,

					    HTRIGRULE2, HTRIGRULE3, HTRIGRULE4]
(C7) 			     TELLSIMP(f(x), g(x))
(D7) 			        [fRULE2, FALSE]
(C8) 

------------------------------------------------------------------------

Running under CMUCL, kill does not remove the new rule from the list.
The second tellsimp then causes an error.

------------------------------------------------------------------------
|abacus>./maxima-local --lisp=cmucl --batch=bug.mac 

CMU Common Lisp release x86-linux 3.0.8 18c+ 31 December 2001 build
3030, running on abacus
For support see http://www.cons.org/cmucl/support.html Send bug reports
to the debian BTS.
or to pvaneynd@debian.org
type (help) for help, (quit) to exit, and (demo) to see the demos

Loaded subsystems:
    Python 1.0, target Intel x86
    CLOS based on PCL version:  September 16 92 PCL (f)
Maxima 5.9.0pre-cvs (with enhancements by W. Schelter).
Licensed under the GNU Public License (see file COPYING)
(C1) 

batching /home/amundson/notwork/maxima/maxima/bug.mac
(C2) 				     RULES
(D2) [TRIGRULE0, TRIGRULE1, TRIGRULE2, TRIGRULE3, TRIGRULE4, HTRIGRULE1,

					    HTRIGRULE2, HTRIGRULE3, HTRIGRULE4]
(C3) 			     TELLSIMP(f(x), g(x))
(D3) 			        [fRULE1, FALSE]
(C4) 				     RULES
(D4) [TRIGRULE0, TRIGRULE1, TRIGRULE2, TRIGRULE3, TRIGRULE4, HTRIGRULE1,

				    HTRIGRULE2, HTRIGRULE3, HTRIGRULE4, fRULE1]
(C5) 				  KILL(RULES)
(D5) 				     DONE
(C6) 				     RULES
(D6) [TRIGRULE0, TRIGRULE1, TRIGRULE2, TRIGRULE3, TRIGRULE4, HTRIGRULE1,

				    HTRIGRULE2, HTRIGRULE3, HTRIGRULE4, fRULE1]
(C7) 			     TELLSIMP(f(x), g(x))
Circular rule attempted - TELLSIMP
 -- an error.  Quitting.  To debug this try DEBUGMODE(TRUE);)
(C8) 
------------------------------------------------------------------------

I am embarrassed to say that I am having trouble even finding the
definition of "kill" in the source.

--Jim