8000 Reduce parser stack size on WASI · python/cpython@9d6a9e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9d6a9e9

Browse files
committed
Reduce parser stack size on WASI
1 parent 61c6f26 commit 9d6a9e9

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

Lib/test/test_syntax.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2117,7 +2117,6 @@ def test_syntax_error_on_deeply_nested_blocks(self):
21172117
self._check_error(source, "too many statically nested blocks")
21182118

21192119
@support.cpython_only
2120-
@unittest.skipIf(support.is_wasi, "Exhausts WASI call stack")
21212120
def test_error_on_parser_stack_overflow(self):
21222121
source = "-" * 100000 + "4"
21232122
for mode in ["exec", "eval", "single"]:

Parser/parser.c

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/peg_generator/pegen/c_generator.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@
3737
# define D(x)
3838
#endif
3939
40-
# define MAXSTACK 6000
40+
#ifdef __wasi__
41+
# define MAXSTACK 4000
42+
#else
43+
# define MAXSTACK 6000
44+
#endif
4145
4246
"""
4347

0 commit comments

Comments
 (0)
0