Skip to content

Commit cf94932

Browse files
committed
GH-113655: Lower the C recursion limit for all big-endian platforms
We currently reduce the C recursion limit just for s390x (which is big-endian), but in Gentoo, we hit the same issues on ppc64be, hppa, and sparc. At least for ppc64, it seems like the ABI used on ppc64be means you end up with bigger stack frames. Just set it to a sensible, conservative value for all BE platforms.
1 parent 7a2d77c commit cf94932

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Include/cpython/pystate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ struct _ts {
206206
// A debug build is likely built with low optimization level which implies
207207
// higher stack memory usage than a release build: use a lower limit.
208208
# define Py_C_RECURSION_LIMIT 500
209-
#elif defined(__s390x__)
209+
#elif defined(__BIG_ENDIAN__)
210210
# define Py_C_RECURSION_LIMIT 800
211211
#elif defined(_WIN32) && defined(_M_ARM64)
212212
# define Py_C_RECURSION_LIMIT 1000

0 commit comments

Comments
 (0)