8000 GH-124715: trashcan protection for all GC objects by nascheme · Pull Request #124716 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-124715: trashcan protection for all GC objects #124716

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

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Call _Py_Dealloc from ceval.c.
Calling tp_dealloc directly will bypass the trashcan protection and will
not preserve the requirement that GC objects are untracked before
tp_dealloc is called.
  • Loading branch information
nascheme committed Oct 1, 2024
commit 8443e847c9ca6ee30b5392a91c9114cfd0a4f5b5
3 changes: 1 addition & 2 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@
} \
_Py_DECREF_STAT_INC(); \
if (--op->ob_refcnt == 0) { \
destructor dealloc = Py_TYPE(op)->tp_dealloc; \
(*dealloc)(op); \
_Py_Dealloc(op); \
} \
} while (0)

Expand Down
0