https://github.com/python/cpython/commit/a9d122fb0547ee0f97cd3034fbd8bb5ca1e5800b commit: a9d122fb0547ee0f97cd3034fbd8bb5ca1e5800b branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: gpshead <[email protected]> date: 2026-04-12T00:52:21Z summary:
[3.14] gh-148208: Fix recursion depth leak in `PyObject_Print` (GH-148209) (#148412) gh-148208: Fix recursion depth leak in `PyObject_Print` (GH-148209) (cherry picked from commit e2fa10e04d3fed4c248881d69411fc208d05ad6b) Co-authored-by: Wulian233 <[email protected]> files: A Misc/NEWS.d/next/Core_and_Builtins/2026-04-07-20-21-44.gh-issue-148208.JAxpDU.rst M 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 index 00000000000000..b8ae19f5877a7d --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2026-04-07-20-21-44.gh-issue-148208.JAxpDU.rst @@ -0,0 +1 @@ +Fix recursion depth leak in :c:func:`PyObject_Print` diff --git a/Objects/object.c b/Objects/object.c index 62e45f96bfae39..6a17f71886ed96 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -686,6 +686,8 @@ PyObject_Print(PyObject *op, FILE *fp, int flags) ret = -1; } } + + _Py_LeaveRecursiveCall(); return ret; } _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
