A contrived example:
(%i1) load(lrats) $
(%i2) l:makelist(concat('x,i)=concat('x,i+1),i,0,5000) $
(%i3) lratsubst(l,x0);
Maxima encountered a Lisp error:
Condition in MACSYMA-TOP-LEVEL [or a callee]: INTERNAL-SIMPLE-ERROR: Bind stack overflow.
Automatically continuing.
To enable the Lisp debugger set *debugger-hook* to nil.
The problem is due to the use of recursion in ratsubst1and fullratsubst1.
I have attached a patch that re-writes these functions as loops which resolves this problem. The patch includes an iteration limit to prevent infinite loops.
This resolves bug 3376, too.
Leo
Looks good to me, I think you should go ahead. Maybe put one or more test cases into the share test suite.
Thanks, Robert.
This is fixed in commit 864fd56e, including tests and documentation updates.