This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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

Created on 2019-04-04 23:53 by eelizondo, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 12691 merged eelizondo, 2019-04-04 23:57
Messages (2)
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.
msg378769 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2020-10-16 22:20
Can this be closed? Or did you keep it open in order to add a unit test?
History
Date User Action Args
2022-04-11 14:59:13adminsetgithub: 80712
2020-10-16 22:20:42iritkatrielsetnosy: + iritkatriel
messages: + msg378769
2019-04-04 23:57:53eelizondosetkeywords: + patch
stage: patch review
pull_requests: + pull_request12617
2019-04-04 23:53:40eelizondocreate