Skip to content
Prev Previous commit
Next Next commit
Reduce C recursion limit to 2000. 2400 is too hgh for Windows.
  • Loading branch information
markshannon committed Jul 30, 2023
commit d6793eac7fbd6a06ef7828bf03f26cf488c8177c
3 changes: 2 additions & 1 deletion Include/cpython/pystate.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ struct _ts {
# ifdef __wasi__
# define C_RECURSION_LIMIT 500
# else
# define C_RECURSION_LIMIT 2400
// This value is duplicated in Lib/test/support/__init__.py
# define C_RECURSION_LIMIT 2000
# endif
#endif

Expand Down
3 changes: 2 additions & 1 deletion Lib/test/support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2461,4 +2461,5 @@ def adjust_int_max_str_digits(max_digits):
#For recursion tests, easily exceeds default recursion limit
EXCEEDS_RECURSION_LIMIT = 5000

C_RECURSION_LIMIT = 2400
# The default C recursion limit (from Include/cpython/pystate.h).
C_RECURSION_LIMIT = 2000