We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a445c16 commit 7e73c5dCopy full SHA for 7e73c5d
1 file changed
‎Misc/NEWS.d/next/Library/2026-03-02-02-30-00.gh-issue-144475.CfVOu8Hi.rst‎
@@ -0,0 +1,6 @@
1
+Fix a heap-buffer-overflow in :func:`functools.partial.__repr__` where a
2
+user-defined :meth:`~object.__repr__` on an argument could mutate the
3
+:class:`~functools.partial` object via :meth:`~functools.partial.__setstate__`,
4
+freeing the args tuple while iteration was still in progress. The fix holds
5
+strong references to the ``args`` tuple, ``kw`` dict, and ``fn`` callable
6
+during formatting.
0 commit comments