https://github.com/python/cpython/commit/67af96c61c2bafc5ac578e576af18d01a2c7d152
commit: 67af96c61c2bafc5ac578e576af18d01a2c7d152
branch: main
author: Mark Shannon <m...@hotpy.org>
committer: encukou <encu...@gmail.com>
date: 2025-03-14T13:02:09+01:00
summary:

GH-127705: Handle trace refs in specialized decref (GH-131198)

This is missing `_PyReftracerTrack` calls, see gh-131238.
Merging as-is for the 3.14.0a6 release.

files:
M Include/refcount.h

diff --git a/Include/refcount.h b/Include/refcount.h
index ba14bc6965ce3e..3efb7e5fee4a06 100644
--- a/Include/refcount.h
+++ b/Include/refcount.h
@@ -416,6 +416,9 @@ static inline void _Py_DECREF_MORTAL_SPECIALIZED(const char 
*filename, int linen
         _Py_DECREF_DecRefTotal();
     }
     if (--op->ob_refcnt == 0) {
+#ifdef Py_TRACE_REFS
+        _Py_ForgetReference(op);
+#endif
         destruct(op);
     }
 }
@@ -460,6 +463,9 @@ static inline void Py_DECREF_MORTAL_SPECIALIZED(PyObject 
*op, destructor destruc
     assert(!_Py_IsStaticImmortal(op));
     _Py_DECREF_STAT_INC();
     if (--op->ob_refcnt == 0) {
+#ifdef Py_TRACE_REFS
+        _Py_ForgetReference(op);
+#endif
         destruct(op);
     }
 }

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to