You would want to return not exit(0) from a recursive call. Return will unwind the stack on the current call.

If you never return you are guaranteed to overflow the stack.