It is an hidden bug waiting to fire. The main problem is
that ss[ply] is overwritten by search() and qsearch() called
from IID and razoring, so that we cannot hold a pointer to a
local EvalInfo variable.
For instance if we go razoring then we overwrite the pointer
with the address of a variable local to qsearch(), when we return
from qsearch() variable goes out of scope and now ss[ply].evalInfo
holds a stale pointer !
Because we are not looking for troubles we go through the
safe route and we remove it entirely.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
currentMove = threatMove = MOVE_NONE;
reduction = Depth(0);
eval = VALUE_NONE;
- evalInfo = NULL;
}
void SearchStack::initKillers() {
if (tte && (tte->type() & VALUE_TYPE_EVAL))
staticValue = value_from_tt(tte->value(), ply);
else
- {
staticValue = evaluate(pos, ei, threadID);
- ss[ply].evalInfo = &ei;
- }
ss[ply].eval = staticValue;
futilityValue = staticValue + futility_margin(depth, 0); //FIXME: Remove me, only for split
Move killers[KILLER_MAX];
Depth reduction;
Value eval;
- EvalInfo* evalInfo;
void init(int ply);
void initKillers();