Skip to content

Commit 8aa1263

Browse files
authored
GH-111802: set a low recursion limit for test_bad_getattr() in test.pickletester (GH-113996)
1 parent b44b9d9 commit 8aa1263

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/test/pickletester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2437,7 +2437,7 @@ def test_bad_getattr(self):
24372437
# Issue #3514: crash when there is an infinite loop in __getattr__
24382438
x = BadGetattr()
24392439
for proto in range(2):
2440-
with support.infinite_recursion():
2440+
with support.infinite_recursion(25):
24412441
self.assertRaises(RuntimeError, self.dumps, x, proto)
24422442
for proto in range(2, pickle.HIGHEST_PROTOCOL + 1):
24432443
s = self.dumps(x, proto)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Specify a low recursion depth for ``test_bad_getattr()`` in
2+
``test.pickletester`` to avoid exhausting the stack under a pydebug build
3+
for WASI.

0 commit comments

Comments
 (0)