8000 Clear child executors from side exits · python/cpython@326401b · GitHub
[go: up one dir, main page]

Skip to content

Commit 326401b

Browse files
Eclips4brandtbucher
andcommitted
Clear child executors from side exits
Co-authored-by: Brandt Bucher <brandt@python.org>
1 parent 1874cf1 commit 326401b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/optimizer.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,10 @@ uop_dealloc(_PyExecutorObject *self) {
257257
_PyObject_GC_UNTRACK(self);
258258
assert(self->vm_data.code == NULL);
259259
unlink_executor(self);
260+
for (uint32_t i = 0; i < self->exit_count; i++) {
261+
self->exits[i].temperature = initial_unreachable_backoff_counter();
262+
Py_CLEAR(self->exits[i].executor);
263+
}
260264
#ifdef _Py_JIT
261265
_PyJIT_Free(self);
262266
#endif

0 commit comments

Comments
 (0)
0