GH-94329: Don't raise on excessive stack consumption (GH-94421) (GH-94446)

(cherry picked from commit b152bf448b321e3a4c0a7280e0b608840f5ac661)
3 files changed