Does CUDA support recursion?

My Env: CUDA 6.5 with Tesla K20cU
I have a small device recursion function, which is running fine in “Release”.
But when I do “Debug”, CUDA will complain “an illegal instruction was encountered”
NSight debug points me to this recursion and saying “CUDA detected data stack overflow”. After removing the recursion function, it’s working fine again.
So questions is whether CUDA support recursion properly? For my case, why only “Release” is working fine?