Mercurial > hg
view tests/test-gendoc-de.t @ 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 | 7a1ad08b9ff5 |
children |
line wrap: on
line source
#require docutils gettext $ $TESTDIR/check-gendoc de checking for parse errors Die Dateien werden dem Projektarchiv beim n\xc3\xa4chsten \xc3\x9cbernehmen (commit) hinzugef\xc3\xbcgt. Um dies vorher r\xc3\xbcckg\xc3\xa4ngig zu machen, siehe:hg:`forget`. (esc) warning: please have a space before :hg: