Skip to content

Commit 62ff43c

Browse files
committed
Lower WASI C recursion limit again
1 parent 1a2dcfe commit 62ff43c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Include/cpython/pystate.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,12 @@ struct _ts {
193193
#ifdef Py_DEBUG
194194
// A debug build is likely built with low optimization level which implies
195195
// higher stack memory usage than a release build: use a lower limit.
196-
# define Py_C_RECURSION_LIMIT 500
196+
# if defined(__wasi__)
197+
// Based on wasmtime 16.
198+
# define Py_C_RECURSION_LIMIT 400
199+
# else
200+
# define Py_C_RECURSION_LIMIT 500
201+
# endif
197202
#elif defined(__s390x__)
198203
# define Py_C_RECURSION_LIMIT 800
199204
#elif defined(_WIN32) && defined(_M_ARM64)

0 commit comments

Comments
 (0)