Skip to content

gh-132983: Call Py_XDECREF rather than PyObject_GC_Del in failed __new__ #133962

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 1 commit into from
May 13, 2025

Conversation

encukou
Copy link
Member

@encukou encukou commented May 13, 2025

This will call tp_dealloc and clear all members.

This will call tp_dealloc and clear all members.
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

See also https://github.com/python/cpython/pull/133924/files#r2084922874

There may be other similar errors in these files.

@encukou
Copy link
Member Author

encukou commented May 13, 2025

I'll merge to fix the tier-1 buildbot; further fix-ups welcome.

@encukou encukou merged commit e575190 into python:main May 13, 2025
42 checks passed
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.14 bugs and security fixes label May 13, 2025
@miss-islington-app
Copy link

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @encukou, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker e575190abbd9409adad3e7fd95424f827236bed9 3.14

@AA-Turner
Copy link
Member

Thanks for the fix & merge @encukou -- backport will fail as the original commit isn't yet backported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants