summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2023-11-20 13:27:33 (GMT)
committerGitHub <noreply@github.com>2023-11-20 13:27:33 (GMT)
commit56e59a49ae4d9f518c5cc918aefe7eeee11736b4 (patch)
tree4516ddb2f716a9fd42c3c155e994230bfed89a8d /Parser
parentce1096f974d3158a92e050f9226700775b8db398 (diff)
downloadcpython-56e59a49ae4d9f518c5cc918aefe7eeee11736b4.zip
cpython-56e59a49ae4d9f518c5cc918aefe7eeee11736b4.tar.gz
cpython-56e59a49ae4d9f518c5cc918aefe7eeee11736b4.tar.bz2
GH-111807: Lower the parser stack depth under WASI debug builds (#112225)
Diffstat (limited to 'Parser')
-rw-r--r--Parser/parser.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Parser/parser.c b/Parser/parser.c
index ca8e9d0..d27ddd3 100644
--- a/Parser/parser.c
+++ b/Parser/parser.c
@@ -8,7 +8,11 @@
#endif
#ifdef __wasi__
-# define MAXSTACK 4000
+# ifdef Py_DEBUG
+# define MAXSTACK 1000
+# else
+# define MAXSTACK 4000
+# endif
#else
# define MAXSTACK 6000
#endif