mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	GH-131770: increase assumed WASI stack size to 131072 (wasi-sdk default) (#131844)
e9524a0980/libc-top-half/musl/src/internal/pthread_impl.h (L220)
Signed-off-by: Filipe Laíns <lains@riseup.net>
			
			
This commit is contained in:
		
							parent
							
								
									0dbaeb94a8
								
							
						
					
					
						commit
						6ab4acecf9
					
				
					 3 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
					@ -485,6 +485,7 @@ def test_ar(self):
 | 
				
			||||||
        s = ''.join([ str(f(x)) for x in range(200) ])
 | 
					        s = ''.join([ str(f(x)) for x in range(200) ])
 | 
				
			||||||
        eq(s, "01233333333444444444444444444444444444444444444444444444444444444444444444444444444444444444444444445553333333344444444444444444444444444444444444444444444444444444444444444444444444444444444444444444")
 | 
					        eq(s, "01233333333444444444444444444444444444444444444444444444444444444444444444444444444444444444444444445553333333344444444444444444444444444444444444444444444444444444444444444444444444444444444444444444")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @support.skip_wasi_stack_overflow()
 | 
				
			||||||
    def test_security(self):
 | 
					    def test_security(self):
 | 
				
			||||||
        raises = self.assertRaises
 | 
					        raises = self.assertRaises
 | 
				
			||||||
        # Test for a dangerous expression
 | 
					        # Test for a dangerous expression
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2900,6 +2900,7 @@ def test_error_on_parser_stack_overflow(self):
 | 
				
			||||||
                    compile(source, "<string>", mode)
 | 
					                    compile(source, "<string>", mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @support.cpython_only
 | 
					    @support.cpython_only
 | 
				
			||||||
 | 
					    @support.skip_wasi_stack_overflow()
 | 
				
			||||||
    def test_deep_invalid_rule(self):
 | 
					    def test_deep_invalid_rule(self):
 | 
				
			||||||
        # Check that a very deep invalid rule in the PEG
 | 
					        # Check that a very deep invalid rule in the PEG
 | 
				
			||||||
        # parser doesn't have exponential backtracking.
 | 
					        # parser doesn't have exponential backtracking.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -364,7 +364,7 @@ _Py_EnterRecursiveCallUnchecked(PyThreadState *tstate)
 | 
				
			||||||
#  define Py_C_STACK_SIZE 1600000
 | 
					#  define Py_C_STACK_SIZE 1600000
 | 
				
			||||||
#elif defined(__wasi__)
 | 
					#elif defined(__wasi__)
 | 
				
			||||||
   /* Web assembly has two stacks, so this isn't really the stack depth */
 | 
					   /* 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__)
 | 
					#elif defined(__hppa__) || defined(__powerpc64__)
 | 
				
			||||||
#  define Py_C_STACK_SIZE 2000000
 | 
					#  define Py_C_STACK_SIZE 2000000
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue