1
0
forked from aniani/vim

patch 8.0.1283: test 86 fails under ASAN

Problem:    Test 86 fails under ASAN.
Solution:   Fix that an item was added to a dictionary twice.
This commit is contained in:
Bram Moolenaar
2017-11-09 22:10:33 +01:00
parent cef7322d8a
commit 9ed7d34af3
2 changed files with 5 additions and 1 deletions

View File

@@ -1996,6 +1996,7 @@ DictionaryUpdate(DictionaryObject *self, PyObject *args, PyObject *kwargs)
PyObject *todecref;
char_u *key;
dictitem_T *di;
hashitem_T *hi;
if (!(fast = PySequence_Fast(item, "")))
{
@@ -2052,7 +2053,8 @@ DictionaryUpdate(DictionaryObject *self, PyObject *args, PyObject *kwargs)
Py_DECREF(fast);
if (dict_add(dict, di) == FAIL)
hi = hash_find(&dict->dv_hashtab, di->di_key);
if (!HASHITEM_EMPTY(hi) || dict_add(dict, di) == FAIL)
{
RAISE_KEY_ADD_FAIL(di->di_key);
Py_DECREF(iterator);

View File

@@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1283,
/**/
1282,
/**/