Hmmmm....Uri Blass wrote: I am not sure that the size of pv is PLY_MAX_PLUS_2
if the pv is from the SearchStack then
I can see the following code as part of stockfish in search.h.
struct SearchStack {
Move pv[PLY_MAX];
SearchStack definition is:
Code: Select all
struct SearchStack {
Move pv[PLY_MAX];
Move currentMove;
Move mateKiller;
Move threatMove;
Move killers[KILLER_MAX];
Depth reduction;
void init(int ply);
void initKillers();
};
SearchStack.currentMove = MOVE_NONE;
This is an unwanted side effect of calling extract_pv(), of course very rare but possible, but should be harmless because we don't use currentMove after calling extract_pv().
Anyhow I think you _could_ be right, a fix IMHO is not necessary because as I said currentMove is not used there, but for sure a patch in the new development version would be needed.
Thanks again !