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.

Author vstinner
Recipients vstinner
Date 2020-06-22.14:50:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org>
In-reply-to
Content
PyTuple_GET_ITEM() can be abused to access directly the PyTupleObject.ob_item member:

   PyObject **items = &PyTuple_GET_ITEM(0);

Giving a direct access to an array or PyObject* (PyObject**) is causing issues with other Python implementations, like PyPy, which don't use PyObject internally.

I propose to convert the PyTuple_GET_ITEM() and PyList_GET_ITEM() macros to static inline functions to disallow that.
History
Date User Action Args
2020-06-22 14:50:13vstinnersetrecipients: + vstinner
2020-06-22 14:50:13vstinnersetmessageid: <1592837413.67.0.409413280161.issue41078@roundup.psfhosted.org>
2020-06-22 14:50:13vstinnerlinkissue41078 messages
2020-06-22 14:50:13vstinnercreate