]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-148208: Fix recursion depth leak in `PyObject_Print` (GH-148209)
authorWulian233 <1055917385@qq.com>
Sun, 12 Apr 2026 00:26:18 +0000 (08:26 +0800)
committerGitHub <noreply@github.com>
Sun, 12 Apr 2026 00:26:18 +0000 (17:26 -0700)
Misc/NEWS.d/next/Core_and_Builtins/2026-04-07-20-21-44.gh-issue-148208.JAxpDU.rst [new file with mode: 0644]
Objects/object.c

diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-04-07-20-21-44.gh-issue-148208.JAxpDU.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-04-07-20-21-44.gh-issue-148208.JAxpDU.rst
new file mode 100644 (file)
index 0000000..b8ae19f
--- /dev/null
@@ -0,0 +1 @@
+Fix recursion depth leak in :c:func:`PyObject_Print`
index 4db22f372ec3f703ec428fe0699f3573baaf3a10..3166254f6f640b486ccbd0990b9ae3d929e57353 100644 (file)
@@ -688,6 +688,8 @@ PyObject_Print(PyObject *op, FILE *fp, int flags)
             ret = -1;
         }
     }
+
+    _Py_LeaveRecursiveCall();
     return ret;
 }