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 eelizondo
Recipients eelizondo
Date 2018-08-27.20:25:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1535401541.74.0.56676864532.issue34522@psf.upfronthosting.co.za>
In-reply-to
Content
From the documentation, it says that PyType_Ready should be called on `ALL` type objects to finish their initialization (https://docs.python.org/3/c-api/type.html#c.PyType_Ready). This means that a PyTypeObject's ob_type should always be set by PyType_Ready.

It turns out that this is not actually followed by all the core types in CPython. This leads to the usage of types that were not initialized through PyType_Ready.

This fix modifies PyVarObject_HEAD_INIT to default the type to NULL so that all objects have to be fully initialized through PyType_Ready.

Plus:
* It initializes all the objects that were not being initialized through PyType_Ready.
* Modifies PyType_Ready to special case the ob_type initialization of PyType_Type and PyBaseObject_Type.
* It modifies the edge case of _Py_FalseStruct and _Py_TrueStruct.

Read more: https://mail.python.org/pipermail/python-dev/2018-August/154946.html
History
Date User Action Args
2018-08-27 20:25:41eelizondosetrecipients: + eelizondo
2018-08-27 20:25:41eelizondosetmessageid: <1535401541.74.0.56676864532.issue34522@psf.upfronthosting.co.za>
2018-08-27 20:25:41eelizondolinkissue34522 messages
2018-08-27 20:25:41eelizondocreate