WebSafe 3.7github.com
|
|
🏠
Skip to content

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

Merged
encukou merged 1 commit intopython:mainfrom
encukou:zstd-new-refleak
May 13, 2025
Merged

gh-132983: Call Py_XDECREF rather than PyObject_GC_Del in failed __new__#133962
encukou merged 1 commit intopython:mainfrom
encukou:zstd-new-refleak

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.

@AA-Turner AA-Turner added needs backport to 3.14 bugs and security fixes and removed needs backport to 3.14 bugs and security fixes labels May 20, 2025
@miss-islington-app
Copy link

Thanks @encukou for the PR 🌮🎉.. 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 May 20, 2025
…d __new__ (pythonGH-133962)

Call Py_XDECREF rather than PyObject_GC_Del in failed __new__

This will call tp_dealloc and clear all members.
(cherry picked from commit e575190)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented May 20, 2025

GH-134305 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 May 20, 2025
AA-Turner pushed a commit that referenced this pull request May 20, 2025
…ed __new__ (GH-133962) (#134305)

gh-132983: Call Py_XDECREF rather than PyObject_GC_Del in failed __new__ (GH-133962)

Call Py_XDECREF rather than PyObject_GC_Del in failed __new__

This will call tp_dealloc and clear all members.
(cherry picked from commit e575190)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
…d __new__ (pythonGH-133962)

Call Py_XDECREF rather than PyObject_GC_Del in failed __new__

This will call tp_dealloc and clear all members.
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
…d __new__ (pythonGH-133962)

Call Py_XDECREF rather than PyObject_GC_Del in failed __new__

This will call tp_dealloc and clear all members.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants

Comments