Without using recursion how can a stack overflow exception be thrown?
You can allocate a few bytes in the stack as well.
static void Main(string[] args) { Span b = stackalloc byte[1024 * 1024 * 1024]; // Process is terminating due to StackOverflowException. }