Skip to content

Conversation

@encukou
Copy link
Member

@encukouencukou commented Mar 20, 2025

This reverts commit fd545d7,
which broke Py_TRACE_REFS builds.

…ake sure _PyReftracerTrack is called" This broke Py_TRACE_REFS builds. This reverts commit fd545d7.
@colesbury
Copy link
Contributor

This is easy to fix. _Py_Dealloc() is responsible for _Py_ForgetReference() so we only should include it manually if we're not going to call _Py_Dealloc().

diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h index 08cbfe46b0d..30b88404bbe 100644 --- a/Include/internal/pycore_object.h+++ b/Include/internal/pycore_object.h@@ -445,9 +445,6 @@ static inline void Py_DECREF_MORTAL(const char *filename, int lineno, PyObject * _Py_DECREF_DecRefTotal()} if (--op->ob_refcnt == 0){-#ifdef Py_TRACE_REFS- _Py_ForgetReference(op);-#endif _Py_Dealloc(op)} }

@markshannon
Copy link
Member

Thanks Sam

#131508

@vstinner
Copy link
Member

Issue fixed by 684a759, this revert is no longer needed.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@encukou@colesbury@markshannon@vstinner