diff options
Diffstat (limited to 'Python/gc_free_threading.c')
-rw-r--r-- | Python/gc_free_threading.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/gc_free_threading.c b/Python/gc_free_threading.c index 70dace9..4c459b0 100644 --- a/Python/gc_free_threading.c +++ b/Python/gc_free_threading.c @@ -433,6 +433,12 @@ static void gc_visit_thread_stacks(PyInterpreterState *interp, struct collection_state *state) { _Py_FOR_EACH_TSTATE_BEGIN(interp, p) { + _PyCStackRef *c_ref = ((_PyThreadStateImpl *)p)->c_stack_refs; + while (c_ref != NULL) { + gc_visit_stackref(c_ref->ref); + c_ref = c_ref->next; + } + for (_PyInterpreterFrame *f = p->current_frame; f != NULL; f = f->previous) { if (f->owner >= FRAME_OWNED_BY_INTERPRETER) { continue; |