diff options
author | Mark Shannon <mark@hotpy.org> | 2025-03-14 12:02:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-14 13:02:09 +0100 |
commit | 67af96c61c2bafc5ac578e576af18d01a2c7d152 (patch) | |
tree | 1c0c377e8259c4b259470e5cc779e058203c1613 /Include/refcount.h | |
parent | fc07f863ee2a942dd96e1ca9edf049603fbb574e (diff) | |
download | cpython-67af96c61c2bafc5ac578e576af18d01a2c7d152.tar.gz cpython-67af96c61c2bafc5ac578e576af18d01a2c7d152.zip |
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.
Diffstat (limited to 'Include/refcount.h')
-rw-r--r-- | Include/refcount.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/refcount.h b/Include/refcount.h index ba14bc6965c..3efb7e5fee4 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); } } |