mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-117008: Fix functools test_recursive_pickle() (#117009)
Use support.infinite_recursion() in test_recursive_pickle() of test_functools to prevent a stack overflow on "ARM64 Windows Non-Debug" buildbot. Lower Py_C_RECURSION_LIMIT to 1,000 frames on Windows ARM64.
This commit is contained in:
parent
72eea512b8
commit
9967b568ed
2 changed files with 6 additions and 2 deletions
|
@ -334,8 +334,10 @@ class TestPartial:
|
|||
f.__setstate__((f, (), {}, {}))
|
||||
try:
|
||||
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
|
||||
with self.assertRaises(RecursionError):
|
||||
pickle.dumps(f, proto)
|
||||
# gh-117008: Small limit since pickle uses C stack memory
|
||||
with support.infinite_recursion(100):
|
||||
with self.assertRaises(RecursionError):
|
||||
pickle.dumps(f, proto)
|
||||
finally:
|
||||
f.__setstate__((capture, (), {}, {}))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue