Instead of duplicating an item struct's fields in the hash entry struct that wraps it, add the entire item struct as a field of the hash entry. This eliminates casts and ensures the type system understands what we're doing.
Fixes strict aliasing violations in dcm_init(): we were assigning through a cast and then immediately reading through the original pointer. This happened to cause segfaults on RHEL 9 aarch64, but any compiler would be entitled to optimize away the read.
Also rename some variables to clarify that they're not _hash_entry structs.
Instead of duplicating an item struct's fields in the hash entry struct that wraps it, add the entire item struct as a field of the hash entry. This eliminates casts and ensures the type system understands what we're doing.
Fixes strict aliasing violations in
dcm_init()
: we were assigning through a cast and then immediately reading through the original pointer. This happened to cause segfaults on RHEL 9 aarch64, but any compiler would be entitled to optimize away the read.Also rename some variables to clarify that they're not
_hash_entry
structs.