diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index f005729fff11b6..32f68378ea5d72 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -218,9 +218,15 @@ struct _ts { # define Py_C_RECURSION_LIMIT 3000 #elif defined(_Py_ADDRESS_SANITIZER) # define Py_C_RECURSION_LIMIT 4000 +#elif defined(__sparc__) + // test_descr crashed on sparc64 with >7000 but let's keep a margin of error. +# define Py_C_RECURSION_LIMIT 4000 #elif defined(__wasi__) // Based on wasmtime 16. # define Py_C_RECURSION_LIMIT 5000 +#elif defined(__hppa__) || defined(__powerpc64__) + // test_descr crashed with >8000 but let's keep a margin of error. +# define Py_C_RECURSION_LIMIT 5000 #else // This value is duplicated in Lib/test/support/__init__.py # define Py_C_RECURSION_LIMIT 10000