I'm slightly concerned about portability, but it looks like we can use "ulimit -s" on Mac OS. I'll defer to Kostya to decide if we need even less deep recursion, or fine with making this test Posix-only. http://reviews.llvm.org/D4562