cpython: ef1f5aebe1a6 (original) (raw)

Mercurial > cpython

changeset 97629:ef1f5aebe1a6 3.5

Issue #24992: Fix error handling and a race condition (related to garbage collection) in collections.OrderedDict constructor. Patch reviewed by Serhiy Storchaka. [#24992]

Victor Stinner victor.stinner@gmail.com
date Thu, 03 Sep 2015 17:50:04 +0200
parents ac1995b01028
children e9929da99349 863407e80370
files Misc/NEWS Objects/odictobject.c
diffstat 2 files changed, 25 insertions(+), 18 deletions(-)[+] [-] Misc/NEWS 3 Objects/odictobject.c 40

line wrap: on

line diff

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -14,6 +14,9 @@ Core and Builtins Library ------- +- Issue #24992: Fix error handling and a race condition (related to garbage

--- a/Objects/odictobject.c +++ b/Objects/odictobject.c @@ -98,7 +98,6 @@ For removing nodes: Others: -* _odict_initialize(od)

-} - /* Returns NULL if there was some error or the key was not found. */ static _ODictNode * _odict_find_node(PyODictObject *od, PyObject *key) @@ -744,7 +734,7 @@ static _ODictNode / If someone calls PyDict_DelItem() directly on an OrderedDict, we'll get all sorts of problems here. In PyODict_DelItem we make sure to call _odict_clear_node first.

+

+

+

+

} /* PyODict_Type */