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 Pasha Stetsenko
Recipients Pasha Stetsenko, serhiy.storchaka
Date 2018-06-04.16:35:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1528130159.53.0.592728768989.issue33742@psf.upfronthosting.co.za>
In-reply-to
Content
The code is simple:
```
// first initialize PyStructSequence_Field* fields; then:
PyTypeObject* type = malloc(sizeof(PyTypeObject));
PyStructSequence_InitType(type, desc);
```

Of course, `malloc` can accidentally allocate memory that is already filled with 0s (especially if it is run at the start of the program). So in order to make the code exhibit the bug reliably, you can add
```
memset(type, 0xDA, sizeof(PyTypeObject));
```
after the `malloc`.
History
Date User Action Args
2018-06-04 16:35:59Pasha Stetsenkosetrecipients: + Pasha Stetsenko, serhiy.storchaka
2018-06-04 16:35:59Pasha Stetsenkosetmessageid: <1528130159.53.0.592728768989.issue33742@psf.upfronthosting.co.za>
2018-06-04 16:35:59Pasha Stetsenkolinkissue33742 messages
2018-06-04 16:35:59Pasha Stetsenkocreate