Title: PyType_FromSpec wrong behavior with multiple Py_tp_members
Type: Stage: patch review
Components: Versions:
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: eelizondo
Priority: normal Keywords: patch

Created on 2019-04-04 23:53 by eelizondo, last changed 2019-04-04 23:57 by eelizondo.

Pull Requests
URL Status Linked Edit
PR 12691 merged eelizondo, 2019-04-04 23:57
Messages (1)
msg339468 - (view) Author: Eddie Elizondo (eelizondo) * Date: 2019-04-04 23:53
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.
Date User Action Args
2019-04-04 23:57:53eelizondosetkeywords: + patch
stage: patch review
pull_requests: + pull_request12617
2019-04-04 23:53:40eelizondocreate