Skip to content

GH-131770: increase assumed WASI stack size to 131072 (wasi-sdk default) #131844

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2025
Merged
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
1 change: 1 addition & 0 deletions Lib/test/test_gettext.py
Original file line number Diff line number Diff line change
@@ -485,6 +485,7 @@ def test_ar(self):
s = ''.join([ str(f(x)) for x in range(200) ])
eq(s, "01233333333444444444444444444444444444444444444444444444444444444444444444444444444444444444444444445553333333344444444444444444444444444444444444444444444444444444444444444444444444444444444444444444")

@support.skip_wasi_stack_overflow()
def test_security(self):
raises = self.assertRaises
# Test for a dangerous expression
1 change: 1 addition & 0 deletions Lib/test/test_syntax.py
Original file line number Diff line number Diff line change
@@ -2928,6 +2928,7 @@ def test_error_on_parser_stack_overflow(self):
compile(source, "<string>", mode)

@support.cpython_only
@support.skip_wasi_stack_overflow()
def test_deep_invalid_rule(self):
# Check that a very deep invalid rule in the PEG
# parser doesn't have exponential backtracking.
2 changes: 1 addition & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
@@ -364,7 +364,7 @@ _Py_EnterRecursiveCallUnchecked(PyThreadState *tstate)
# define Py_C_STACK_SIZE 1600000
#elif defined(__wasi__)
/* Web assembly has two stacks, so this isn't really the stack depth */
# define Py_C_STACK_SIZE 80000
# define Py_C_STACK_SIZE 131072 // wasi-libc DEFAULT_STACK_SIZE
#elif defined(__hppa__) || defined(__powerpc64__)
# define Py_C_STACK_SIZE 2000000
#else