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

@ -177,12 +177,16 @@ class AutoFileTests:
finally:
os.close(fd)
@unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
# @unittest.skipUnless(cosmo.MODE == "dbg", "disabled recursion checking")
def testRecursiveRepr(self):
# Issue #25455
with swap_attr(self.f, 'name', self.f):
with self.assertRaises(RuntimeError):
try:
repr(self.f) # Should not crash
except (RuntimeError, MemoryError):
pass
else:
assert False
def testErrors(self):
f = self.f