Message318671
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`. |
|
Date |
User |
Action |
Args |
2018-06-04 16:35:59 | Pasha Stetsenko | set | recipients:
+ Pasha Stetsenko, serhiy.storchaka |
2018-06-04 16:35:59 | Pasha Stetsenko | set | messageid: <1528130159.53.0.592728768989.issue33742@psf.upfronthosting.co.za> |
2018-06-04 16:35:59 | Pasha Stetsenko | link | issue33742 messages |
2018-06-04 16:35:59 | Pasha Stetsenko | create | |
|