Your functions are not tail-recursive, so the compiler (and interpreter) increase stack for each iteration, eventually running out of it.
Your options are enumerated in FAQ How do I avoid stack overflow?; the relevant are:
- Compile the functions
- Increase Lisp stack size
- Rewrite using iteration instead of recursion
- Rewrite using tail-recursion and compile