mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)
* Implement C recursion protection with limit pointers * Remove calls to PyOS_CheckStack * Add stack protection to parser * Make tests more robust to low stacks * Improve error messages for stack overflow
This commit is contained in:
parent
c637bce20a
commit
2498c22fa0
47 changed files with 1217 additions and 1463 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import unittest
|
||||
from test.support import (cpython_only, is_wasi, requires_limited_api, Py_DEBUG,
|
||||
set_recursion_limit, skip_on_s390x, skip_emscripten_stack_overflow,
|
||||
set_recursion_limit, skip_on_s390x, exceeds_recursion_limit, skip_emscripten_stack_overflow,
|
||||
skip_if_sanitizer, import_helper)
|
||||
try:
|
||||
import _testcapi
|
||||
|
|
@ -1064,10 +1064,10 @@ class TestRecursion(unittest.TestCase):
|
|||
recurse(90_000)
|
||||
with self.assertRaises(RecursionError):
|
||||
recurse(101_000)
|
||||
c_recurse(100)
|
||||
c_recurse(50)
|
||||
with self.assertRaises(RecursionError):
|
||||
c_recurse(90_000)
|
||||
c_py_recurse(90)
|
||||
c_py_recurse(50)
|
||||
with self.assertRaises(RecursionError):
|
||||
c_py_recurse(100_000)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue