commit | a3626bc5bddf9bf43f33060f4ea1a99f25e0c7f1 | [log] [tgz] |
---|---|---|
author | Raymond Hettinger <python@rcn.com> | Wed Jul 15 23:50:14 2015 -0700 |
committer | Raymond Hettinger <python@rcn.com> | Wed Jul 15 23:50:14 2015 -0700 |
tree | 269c45ad9cba4708570ab9596331bbd91e4fb7e3 | |
parent | ced770da07f9dbd7cc3afd09c2488c60faefe73c [diff] [blame] |
Issue #24583: Fix crash when set is mutated while being updated.
diff --git a/Objects/setobject.c b/Objects/setobject.c index d962c1e..704d7e2 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c
@@ -600,7 +600,8 @@ } /* We can't assure there are no duplicates, so do normal insertions */ - for (i = 0; i <= other->mask; i++, other_entry++) { + for (i = 0; i <= other->mask; i++) { + other_entry = &other->table[i]; key = other_entry->key; if (key != NULL && key != dummy) { Py_INCREF(key);