This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes
Date 2020-06-21.08:52:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1592729577.35.0.278051056824.issue41061@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-06-21 08:52:57christian.heimessetrecipients: + christian.heimes
2020-06-21 08:52:57christian.heimessetmessageid: <1592729577.35.0.278051056824.issue41061@roundup.psfhosted.org>
2020-06-21 08:52:57christian.heimeslinkissue41061 messages
2020-06-21 08:52:57christian.heimescreate