mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Add stack overflow checking to Python
This commit is contained in:
parent
47a53e143b
commit
7521bf9e73
16 changed files with 47 additions and 46 deletions
4
third_party/python/Lib/test/test_sys.py
vendored
4
third_party/python/Lib/test/test_sys.py
vendored
|
@ -191,7 +191,6 @@ class SysModuleTest(unittest.TestCase):
|
|||
finally:
|
||||
sys.setswitchinterval(orig)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_recursionlimit(self):
|
||||
self.assertRaises(TypeError, sys.getrecursionlimit, 42)
|
||||
oldlimit = sys.getrecursionlimit()
|
||||
|
@ -201,7 +200,6 @@ class SysModuleTest(unittest.TestCase):
|
|||
self.assertEqual(sys.getrecursionlimit(), 10000)
|
||||
sys.setrecursionlimit(oldlimit)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_recursionlimit_recovery(self):
|
||||
if hasattr(sys, 'gettrace') and sys.gettrace():
|
||||
self.skipTest('fatal error if run with a trace function')
|
||||
|
@ -225,7 +223,6 @@ class SysModuleTest(unittest.TestCase):
|
|||
finally:
|
||||
sys.setrecursionlimit(oldlimit)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
@test.support.cpython_only
|
||||
def test_setrecursionlimit_recursion_depth(self):
|
||||
# Issue #25274: Setting a low recursion limit must be blocked if the
|
||||
|
@ -261,7 +258,6 @@ class SysModuleTest(unittest.TestCase):
|
|||
finally:
|
||||
sys.setrecursionlimit(oldlimit)
|
||||
|
||||
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
|
||||
def test_recursionlimit_fatalerror(self):
|
||||
# A fatal error occurs if a second recursion limit is hit when recovering
|
||||
# from a first one.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue