Skip to content

gh-136517: Print uncollectable objects if DEBUG_UNCOLLECTABLE mode was set #136518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 10, 2025

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 and others added 3 commits July 10, 2025 23:59
…e-136517._NHJyv.rst

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
@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 <sergey.miryanov@gmail.com>
@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 <sergey.miryanov@gmail.com>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy