From: Brett Cannon Date: Fri, 12 Jan 2024 22:14:09 +0000 (-0800) Subject: GH-111802: set a low recursion limit for `test_bad_getattr()` in `test.pickletester... X-Git-Tag: v3.13.0a3~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aa126354d93d7c928fb35b842cb3a4bd6e1881f;p=thirdparty%2FPython%2Fcpython.git GH-111802: set a low recursion limit for `test_bad_getattr()` in `test.pickletester` (GH-113996) --- diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 74b82caf742f..93e7dbbd1039 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -2437,7 +2437,7 @@ class AbstractPickleTests: # Issue #3514: crash when there is an infinite loop in __getattr__ x = BadGetattr() for proto in range(2): - with support.infinite_recursion(): + with support.infinite_recursion(25): self.assertRaises(RuntimeError, self.dumps, x, proto) for proto in range(2, pickle.HIGHEST_PROTOCOL + 1): s = self.dumps(x, proto) diff --git a/Misc/NEWS.d/next/Tests/2024-01-12-12-45-24.gh-issue-111802.gN41vt.rst b/Misc/NEWS.d/next/Tests/2024-01-12-12-45-24.gh-issue-111802.gN41vt.rst new file mode 100644 index 000000000000..7ebcbff1b9b8 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2024-01-12-12-45-24.gh-issue-111802.gN41vt.rst @@ -0,0 +1,3 @@ +Specify a low recursion depth for ``test_bad_getattr()`` in +``test.pickletester`` to avoid exhausting the stack under a pydebug build +for WASI.