cp -r shouldn't allow infinite loops
If you do
> mkdir foo > cp -r . foo
cp will loop ever deeper, until you run out of file descriptors (which may indicate it's leaking them, I haven't checked if that's to be expected or not).
It should stop short, as GNU cp does (but BSD cp doesn't, that one runs out to PATH_MAX instead).