view tests/test-filelog.py.out @ 38335:ae7f27867c2a stable

manifest: fix possible SEGV caused by uninitialized lazymanifest fields Before, uninitialized self->pydata would be passed to lazymanifest_dealloc() on OOM, and Py_DECREF(self->pydata) would crash if we were unlucky. It's still wrong to do malloc() thingy in tp_init because __init__() may be called more than once [1], but I don't want to go a step further in stable branch. [1]: https://docs.python.org/2/c-api/typeobj.html#c.PyTypeObject.tp_new "The tp_new function should ... do only as much further initialization as is absolutely necessary. Initialization that can safely be ignored or repeated should be placed in the tp_init handler."
author Yuya Nishihara <yuya@tcha.org>
date Fri, 15 Jun 2018 22:16:58 +0900
parents d76ba2090e0c
children
line wrap: on
line source

ERROR: FIXME: This is a known failure of filelog.size for data starting with \1\n
OK.