mirror of https://github.com/python/cpython
gh-118074: Immortal executors are not GC-able (#118182)
Better version of gh-118117. Just check for immortality instead of an address range check.
This commit is contained in:
parent
258408239a
commit
7e87d30f1f
|
@ -397,10 +397,7 @@ executor_traverse(PyObject *o, visitproc visit, void *arg)
|
|||
static int
|
||||
executor_is_gc(PyObject *o)
|
||||
{
|
||||
if ((PyObject *)&COLD_EXITS[0] <= o && o < (PyObject *)&COLD_EXITS[COLD_EXIT_COUNT]) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
return !_Py_IsImmortal(o);
|
||||
}
|
||||
|
||||
PyTypeObject _PyUOpExecutor_Type = {
|
||||
|
|
Loading…
Reference in New Issue