xo-arena: verify SM4.2 in DArenaHashMap.verify_ok
This commit is contained in:
parent
fb5216ff98
commit
d90712708a
1 changed files with 13 additions and 0 deletions
|
|
@ -550,6 +550,19 @@ namespace xo {
|
|||
}
|
||||
}
|
||||
|
||||
/* SM4.2: if control_[i] is empty or tombstone, slots_[i].first = key_type() */
|
||||
for (size_type i = 0; i < n_slot_; ++i) {
|
||||
uint8_t c = control_[i];
|
||||
if ((c == c_empty_slot) || (c == c_tombstone)) {
|
||||
if (!(slots_[i].first == key_type())) {
|
||||
return policy.report_error(log,
|
||||
c_self, ": expect empty/tombstone slot has default key",
|
||||
xtag("i", i),
|
||||
xtag("control[i]", c));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue