Message324195
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 |
|
Date |
User |
Action |
Args |
2018-08-27 20:25:41 | eelizondo | set | recipients:
+ eelizondo |
2018-08-27 20:25:41 | eelizondo | set | messageid: <1535401541.74.0.56676864532.issue34522@psf.upfronthosting.co.za> |
2018-08-27 20:25:41 | eelizondo | link | issue34522 messages |
2018-08-27 20:25:41 | eelizondo | create | |
|