mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
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
1 changed files with 1 additions and 4 deletions
|
@ -397,10 +397,7 @@ executor_traverse(PyObject *o, visitproc visit, void *arg)
|
||||||
static int
|
static int
|
||||||
executor_is_gc(PyObject *o)
|
executor_is_gc(PyObject *o)
|
||||||
{
|
{
|
||||||
if ((PyObject *)&COLD_EXITS[0] <= o && o < (PyObject *)&COLD_EXITS[COLD_EXIT_COUNT]) {
|
return !_Py_IsImmortal(o);
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PyTypeObject _PyUOpExecutor_Type = {
|
PyTypeObject _PyUOpExecutor_Type = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue