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
8
third_party/python/Lib/test/test_fileio.py
vendored
8
third_party/python/Lib/test/test_fileio.py
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue