Message371987
Coverity has found four issues in hashtable implementation and tests
Py_hashtable_get_entry_generic(_Py_hashtable_t *ht, const void *key)
CID 1464680 (#1 of 1): Evaluation order violation (EVALUATION_ORDER)write_write_typo: In entry = entry = (_Py_hashtable_entry_t *)((_Py_slist_t *)&ht->buckets[index])->head, entry is written twice with the same value.
_Py_hashtable_get_entry_ptr(_Py_hashtable_t *ht, const void *key)
CID 1464602 (#1 of 1): Evaluation order violation (EVALUATION_ORDER)write_write_typo: In entry = entry = (_Py_hashtable_entry_t *)((_Py_slist_t *)&ht->buckets[index])->head, entry is written twice with the same value.
test_hashtable(PyObject *self, PyObject *Py_UNUSED(args))
CID 1464668 (#1 of 1): Side effect in assertion (ASSERT_SIDE_EFFECT)assignment_where_comparison_intended: Assignment entry->key = (void *)(uintptr_t)key has a side effect. This code will work differently in a non-debug build.
CID 1464664 (#1 of 1): Side effect in assertion (ASSERT_SIDE_EFFECT)assignment_where_comparison_intended: Assignment entry->value = (void *)(uintptr_t)(1 + ((int)key - 97)) has a side effect. This code will work differently in a non-debug build. |
|
Date |
User |
Action |
Args |
2020-06-21 08:52:57 | christian.heimes | set | recipients:
+ christian.heimes |
2020-06-21 08:52:57 | christian.heimes | set | messageid: <1592729577.35.0.278051056824.issue41061@roundup.psfhosted.org> |
2020-06-21 08:52:57 | christian.heimes | link | issue41061 messages |
2020-06-21 08:52:57 | christian.heimes | create | |
|