Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Include/internal/pycore_ceval.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ struct pyruntimestate;
struct _ceval_runtime_state;

#ifndef Py_DEFAULT_RECURSION_LIMIT
# define Py_DEFAULT_RECURSION_LIMIT 1000
# ifdef Py_DEBUG
# define Py_DEFAULT_RECURSION_LIMIT 850
# else
# define Py_DEFAULT_RECURSION_LIMIT 1000
# endif
#endif

#include "pycore_interp.h" // PyInterpreterState.eval_frame
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def __getitem__(self, key):
self.assertEqual(d['z'], 12)

def test_extended_arg(self):
longexpr = 'x = x or ' + '-x' * 2500
longexpr = 'x = x or ' + '-x' * 2000
g = {}
code = '''
def f(x):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Temporarily reduce default recursion to 800 for debug builds. This prevents
C stack overflows with Clang debug builds.