Skip to content
Open
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
5 changes: 4 additions & 1 deletion Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,10 @@ make_executor_from_uops(_PyUOpInstruction *buffer, int length, const _PyBloomFil
}
sanity_check(executor);
#endif
// Note: this MUST be here before any Py_DECREF(executor).
// Otherwise, the GC tries to untrack a still untracked object
// during dealloc.
_PyObject_GC_TRACK(executor);
#ifdef _Py_JIT
executor->jit_code = NULL;
executor->jit_side_entry = NULL;
Expand All @@ -1234,7 +1238,6 @@ make_executor_from_uops(_PyUOpInstruction *buffer, int length, const _PyBloomFil
return NULL;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to reviewers: the bad dealloc happens right above this line at line 1233/1238 depending on which diff you view.

}
#endif
_PyObject_GC_TRACK(executor);
return executor;
}

Expand Down
Loading