diff options
| author | Mark Shannon <mark@hotpy.org> | 2024-01-16 09:32:01 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-16 09:32:01 (GMT) |
| commit | 17b73ab99ef12f89d41acec7500a244e68b1aaa4 (patch) | |
| tree | bcde8fca4dc4dae4f9ed5369a4ea23bb825f15bb /Include/cpython | |
| parent | 6c502ba809ff662a5eebf8c6778dec6bd28918fb (diff) | |
| download | cpython-17b73ab99ef12f89d41acec7500a244e68b1aaa4.zip cpython-17b73ab99ef12f89d41acec7500a244e68b1aaa4.tar.gz cpython-17b73ab99ef12f89d41acec7500a244e68b1aaa4.tar.bz2 | |
GH-113655: Lower the C recursion limit on various platforms (GH-113944)
Diffstat (limited to 'Include/cpython')
| -rw-r--r-- | Include/cpython/pystate.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h index ed7dd82..1091394 100644 --- a/Include/cpython/pystate.h +++ b/Include/cpython/pystate.h @@ -224,10 +224,14 @@ struct _ts { // recursions, sometimes less. 500 is a more conservative limit. # define Py_C_RECURSION_LIMIT 500 #elif defined(__s390x__) -# define Py_C_RECURSION_LIMIT 1200 +# define Py_C_RECURSION_LIMIT 800 +#elif defined(_WIN32) +# define Py_C_RECURSION_LIMIT 4000 +#elif defined(_Py_ADDRESS_SANITIZER) +# define Py_C_RECURSION_LIMIT 4000 #else // This value is duplicated in Lib/test/support/__init__.py -# define Py_C_RECURSION_LIMIT 8000 +# define Py_C_RECURSION_LIMIT 10000 #endif |
