Merge "Improve stack overflow diagnostics."