[issue43916] Check that new heap types cannot be created uninitialised

Pablo Galindo Salgado report at bugs.python.org
Thu Apr 22 17:32:34 EDT 2021


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

Serhiy's comment for reference:

Static type with tp_new = NULL does not have public constructor, but heap type inherits constructor from base class. As result, it allows to create instances without proper initialization, that can lead to crash. It was fixed for few standard heap types in issue23815, then reintroduced, then fixed again in issue42694. But it should be checked for every type without constructor.

----------

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


More information about the Python-bugs-list mailing list