[New-bugs-announce] [issue36531] PyType_FromSpec wrong behavior with multiple Py_tp_members

Eddie Elizondo report at bugs.python.org
Thu Apr 4 19:53:40 EDT 2019


New submission from Eddie Elizondo <eduardo.elizondorueda at gmail.com>:

If a user accidentally defined more than one Py_tp_members in the spec, PyType_FromSpec will ignore all but the last use case. However, the number of members count will cause the type to allocate more memory than needed. This leads to weird behavior and crashes.

The solution is a one line fix to just restart the count if multiple Py_tp_members are defined.

----------
messages: 339468
nosy: eelizondo
priority: normal
severity: normal
status: open
title: PyType_FromSpec wrong behavior with multiple Py_tp_members

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


More information about the New-bugs-announce mailing list