| 126 | } |
| 127 | |
| 128 | static size_t hash_nodeid(const struct node_id *node) |
| 129 | { |
| 130 | /* Reading the key through a size_t pointer was undefined (a u8 |
| 131 | * array is not a size_t), and at -O3 the load could be hoisted |
| 132 | * above the `bias->node = *node` copy in set_node_bias(), so the |
| 133 | * entry was stored under the hash of uninitialised memory and |
| 134 | * later lookups missed it. Hash the whole key instead. */ |
| 135 | return siphash24(siphash_seed(), node->k, sizeof(node->k)); |
| 136 | } |
| 137 | |
| 138 | static bool bias_eq_nodeid(const struct node_bias *bias, |
| 139 | const struct node_id *node) |
nothing calls this directly
no test coverage detected