This commit is contained in:
ton
2024-10-07 10:13:40 +07:00
parent aa1631742f
commit 3a7d696db6
9729 changed files with 1832837 additions and 161742 deletions

View File

@@ -251,12 +251,24 @@ struct _ts {
/* WASI has limited call stack. Python's recursion limit depends on code
layout, optimization, and WASI runtime. Wasmtime can handle about 700
recursions, sometimes less. 500 is a more conservative limit. */
#ifndef C_RECURSION_LIMIT
# ifdef __wasi__
# define C_RECURSION_LIMIT 500
#ifdef Py_DEBUG
# if defined(__wasi__)
# define C_RECURSION_LIMIT 150
# else
// This value is duplicated in Lib/test/support/__init__.py
# define C_RECURSION_LIMIT 1500
# define C_RECURSION_LIMIT 500
# endif
#else
# if defined(__wasi__)
# define C_RECURSION_LIMIT 500
# elif defined(__s390x__)
# define C_RECURSION_LIMIT 800
# elif defined(_WIN32)
# define C_RECURSION_LIMIT 3000
# elif defined(_Py_ADDRESS_SANITIZER)
# define C_RECURSION_LIMIT 4000
# else
// This value is duplicated in Lib/test/support/__init__.py
# define C_RECURSION_LIMIT 10000
# endif
#endif