]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-131770: increase assumed WASI stack size to 131072 (wasi-sdk default) (#131844)
authorFilipe Laíns 🇵🇸 <lains@riseup.net>
Fri, 4 Apr 2025 08:34:02 +0000 (09:34 +0100)
committerGitHub <noreply@github.com>
Fri, 4 Apr 2025 08:34:02 +0000 (09:34 +0100)
https://github.com/WebAssembly/wasi-libc/blob/e9524a0980b9bb6bb92e87a41ed1055bdda5bb86/libc-top-half/musl/src/internal/pthread_impl.h#L220

Signed-off-by: Filipe Laíns <lains@riseup.net>
Lib/test/test_gettext.py
Lib/test/test_syntax.py
Python/ceval.c

index 0fbd90dcb485f86d51e4a6cdfa58326f9dee9169..04d26596849be6c38dacced666fe8728f2a0c0db 100644 (file)
@@ -485,6 +485,7 @@ class PluralFormsInternalTestCase(unittest.TestCase):
         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
index 2c87b145254af60ed41c4e7511dd02597d6466b2..02d10c1961e28de6dda456b979d8229ebe729a9a 100644 (file)
@@ -2900,6 +2900,7 @@ while 1:
                     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.
index 363f263ad2a083adc733cf54a5dfbf943a0e450e..add8c2a28c74e38fe22c33764df2ec5c2cf41b2f 100644 (file)
@@ -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