[New-bugs-announce] [issue44588] Possible double Py_XDECREF in cpython typeobject.c

Ziyue Jiang report at bugs.python.org
Fri Jul 9 03:42:56 EDT 2021


New submission from Ziyue Jiang <ziyue.jiang97 at gmail.com>:

The type_mro_modified() function in Object/typeobject.c may produce double Py_XDECREF on mro_meth and type_mro_meth when enter the code:
if (!_PyType_HasFeature(cls, Py_TPFLAGS_HAVE_VERSION_TAG) ||
!PyType_IsSubtype(type, cls)) {
    goto clear;
}


I think 
mro_meth = NULL;
type_mro_meth = NULL;
should be added after the first time Py_XDECREF them.

----------
components: C API
messages: 397188
nosy: Wesley-Jzy
priority: normal
severity: normal
status: open
title: Possible double Py_XDECREF in cpython typeobject.c
type: crash
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44588>
_______________________________________


More information about the New-bugs-announce mailing list