FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-127705: Revert "Move mortal decrefs to internal header and make sure _PyReftracerTrack is called" by encukou · Pull Request #131500 · python/cpython · GitHub

/ cpython Public

GH-127705: Revert "Move mortal decrefs to internal header and make sure _PyReftracerTrack is called" - #131500

Closed
encukou wants to merge 1 commit into
python:mainfrom
encukou:revert-fd545d7
Closed

GH-127705: Revert "Move mortal decrefs to internal header and make sure _PyReftracerTrack is called"#131500
encukou wants to merge 1 commit into
python:mainfrom
encukou:revert-fd545d7

Conversation

encukou commented Mar 20, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
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);
     }
 }

Copy link
Copy Markdown
Member

Thanks Sam

#131508

Copy link
Copy Markdown
Member

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

vstinner closed this Mar 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to 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


Back | FazBrowse Home | New Git URL