mirror of
https://github.com/python/cpython.git
synced 2025-10-14 10:53:40 +00:00
GH-113655: Lower the C recursion limit on various platforms (GH-113944)
This commit is contained in:
parent
6c502ba809
commit
17b73ab99e
13 changed files with 41 additions and 39 deletions
|
@ -623,12 +623,10 @@ class TestSpecifics(unittest.TestCase):
|
|||
@support.cpython_only
|
||||
@unittest.skipIf(support.is_wasi, "exhausts limited stack on WASI")
|
||||
def test_compiler_recursion_limit(self):
|
||||
# Expected limit is Py_C_RECURSION_LIMIT * 2
|
||||
# Duplicating the limit here is a little ugly.
|
||||
# Perhaps it should be exposed somewhere...
|
||||
fail_depth = Py_C_RECURSION_LIMIT * 2 + 1
|
||||
# Expected limit is Py_C_RECURSION_LIMIT
|
||||
fail_depth = Py_C_RECURSION_LIMIT + 1
|
||||
crash_depth = Py_C_RECURSION_LIMIT * 100
|
||||
success_depth = int(Py_C_RECURSION_LIMIT * 1.8)
|
||||
success_depth = int(Py_C_RECURSION_LIMIT * 0.8)
|
||||
|
||||
def check_limit(prefix, repeated, mode="single"):
|
||||
expect_ok = prefix + repeated * success_depth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue