-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-117139: Garbage collector support for deferred refcounting #122956
Conversation
* The free-threaded GC now visits interpreter stacks to keep objects that use deferred reference counting alive. * Interpreter frames are zero initialized in the free-threaded GC so that the GC doesn't see garbage data. This is a temporary measure until stack spilling around escaping calls is implemented. Co-authored-by: Ken Jin <kenjin@python.org>
This was extracted from: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Python/gc_free_threading.c
Outdated
int | ||
_PyGC_VisitFrameStack(_PyInterpreterFrame *frame, visitproc visit, void *arg) | ||
{ | ||
_PyStackRef *ref = frame->localsplus; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use _PyFrame_GetLocalsArray
like the GIL version just to be consistent?
🤖 New build scheduled with the buildbot fleet by @colesbury for commit 5b9176b 🤖 If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again. |
…ython#122956) The free-threaded GC now visits interpreter stacks to keep objects that use deferred reference counting alive. Interpreter frames are zero initialized in the free-threaded GC so that the GC doesn't see garbage data. This is a temporary measure until stack spilling around escaping calls is implemented. Co-authored-by: Ken Jin <kenjin@python.org>
The free-threaded GC now visits interpreter stacks to keep objects that use deferred reference counting alive.
Interpreter frames are zero initialized in the free-threaded GC so that the GC doesn't see garbage data. This is a temporary measure until stack spilling around escaping calls is implemented.