Skip to content

Conversation

@sergey-miryanov
Copy link
Contributor

@sergey-miryanov sergey-miryanov commented Jul 10, 2025

There was a typo, and uncollectable objects printed only if DEBUG_COLLECTABLE mode is set.
Affected main and 3.14 (183b020)

cpython/Python/gc.c

Lines 1783 to 1787 in 59acdba

for (gc = GC_NEXT(&finalizers); gc != &finalizers; gc = GC_NEXT(gc)) {
n++;
if (gcstate->debug & _PyGC_DEBUG_COLLECTABLE)
debug_cycle("uncollectable", FROM_GC(gc));
}

@Eclips4 Eclips4 added the needs backport to 3.14 bugs and security fixes label Jul 10, 2025
@sergey-miryanov
Copy link
Contributor Author

@pablogsal @nascheme It is ready to review. Please take a look!

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM good catch!

@pablogsal pablogsal merged commit c560df9 into python:main Jul 10, 2025
44 checks passed
@miss-islington-app
Copy link

Thanks @sergey-miryanov for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 10, 2025
…ode was set (pythonGH-136518)

(cherry picked from commit c560df9)

Co-authored-by: Sergey Miryanov <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jul 10, 2025

GH-136522 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jul 10, 2025
@sergey-miryanov
Copy link
Contributor Author

Thanks everyone!

@sergey-miryanov sergey-miryanov deleted the gc-print-uncollectable branch July 11, 2025 04:58
AndPuQing pushed a commit to AndPuQing/cpython that referenced this pull request Jul 11, 2025
pablogsal pushed a commit that referenced this pull request Jul 11, 2025
…mode was set (GH-136518) (#136522)

gh-136517: Print uncollectable objects if DEBUG_UNCOLLECTABLE mode was set (GH-136518)
(cherry picked from commit c560df9)

Co-authored-by: Sergey Miryanov <[email protected]>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
picnixz pushed a commit to picnixz/cpython that referenced this pull request Jul 13, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
…TABLE mode was set (pythonGH-136518) (python#136522)

pythongh-136517: Print uncollectable objects if DEBUG_UNCOLLECTABLE mode was set (pythonGH-136518)
(cherry picked from commit c560df9)

Co-authored-by: Sergey Miryanov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants