mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-30570: Fix segfault on buildbots caused by stack overflow from recursion in tests (GH-29258)
* Don't stackoveflow on debug builds * Also catch the pickletester case
This commit is contained in:
parent
4c95fb4640
commit
d56375a0dd
2 changed files with 18 additions and 12 deletions
|
@ -2383,7 +2383,8 @@ class AbstractPickleTests:
|
|||
# Issue #3514: crash when there is an infinite loop in __getattr__
|
||||
x = BadGetattr()
|
||||
for proto in protocols:
|
||||
self.assertRaises(RuntimeError, self.dumps, x, proto)
|
||||
with support.infinite_recursion():
|
||||
self.assertRaises(RuntimeError, self.dumps, x, proto)
|
||||
|
||||
def test_reduce_bad_iterator(self):
|
||||
# Issue4176: crash when 4th and 5th items of __reduce__()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue