Add stack overflow checking to Python

This commit is contained in:
Justine Tunney 2021-10-02 10:31:24 -07:00
parent 47a53e143b
commit 7521bf9e73
16 changed files with 47 additions and 46 deletions

View file

@ -67,7 +67,6 @@ class TestRecursion:
self.fail("didn't raise ValueError on default recursion")
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
def test_highly_nested_objects_decoding(self):
# test that loading highly-nested objects doesn't segfault when C
# accelerations are used. See #12017
@ -78,7 +77,6 @@ class TestRecursion:
with self.assertRaises(RecursionError):
self.loads('[' * 100000 + '1' + ']' * 100000)
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
def test_highly_nested_objects_encoding(self):
# See #12051
l, d = [], {}
@ -89,7 +87,6 @@ class TestRecursion:
with self.assertRaises(RecursionError):
self.dumps(d)
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
def test_endless_recursion(self):
# See #12051
class EndlessJSONEncoder(self.json.JSONEncoder):