This error is in the procedure trans_store() of the trans.cpp module, on the line marked with a series of ?????????.
Due to the <return>, this line, modifying entry->depth, has no effect if entry->lock != KEY_LOCK(key).
However, entry->depth is only used if entry->lock != KEY_LOCK(key).
So, the modification of entry->depth seems to be never used.
Code: Select all
void trans_store(trans_t * trans, uint64 key, int move, int depth, int min_value, int max_value) {
entry = trans_entry(trans,key);
for (i = 0; i < ClusterSize; i++, entry++) {
if (entry->lock == KEY_LOCK(key)) {
entry->date = trans->date;
????????? if (depth > entry->depth) entry->depth = depth; // for replacement scheme
if (move != MoveNone && depth >= entry->move_depth) {
entry->move_depth = depth;
entry->move = move;
}
if (min_value > -ValueInf && depth >= entry->min_depth) {
entry->min_depth = depth;
entry->min_value = min_value;
}
if (max_value < +ValueInf && depth >= entry->max_depth) {
entry->max_depth = depth;
entry->max_value = max_value;
}
return;
}
// evaluate replacement score
score = trans->age[entry->date] * 256 - entry->depth;
................
................
}