Bug report
Bug description:
The BLAKE-2 internal states are initialized after PyObject_GC_Track is called. If unlucky, we would call py_blake2_clear on uninitialized states since PyObject_GC_New is used (we want to first initialize the objects entirely before tracking them but some fields depend on the type so we can't use zeroing as is).
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Bug report
Bug description:
The BLAKE-2 internal states are initialized after
PyObject_GC_Trackis called. If unlucky, we would callpy_blake2_clearon uninitialized states sincePyObject_GC_Newis used (we want to first initialize the objects entirely before tracking them but some fields depend on the type so we can't use zeroing as is).CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs