In some cases type->tp_mro can be NULL and the new_mro variable can get a null value from the lookup_tp_mro call in the mro_hierarchy function.
|
PyObject *new_mro = lookup_tp_mro(type); |
In this case, there may be problems with calling the Py_NewRef and the Py_DECREF functions.
|
tuple = PyTuple_Pack(3, type, new_mro, old_mro); |
|
tuple = PyTuple_Pack(2, type, new_mro); |
Linked PRs
In some cases type->tp_mro can be NULL and the new_mro variable can get a null value from the lookup_tp_mro call in the mro_hierarchy function.
cpython/Objects/typeobject.c
Line 1654 in 5f50541
In this case, there may be problems with calling the Py_NewRef and the Py_DECREF functions.
cpython/Objects/typeobject.c
Line 1658 in 5f50541
cpython/Objects/typeobject.c
Line 1661 in 5f50541
cpython/Objects/typeobject.c
Line 1674 in 5f50541
Linked PRs