Store Eval::Info in Search::Stack

Instead of a pointer. This should fix the issue of
remaining with a stale pointer when for instance calling
IID, but also null search verification, singular search
and razoring where we call search with the same ss
pointer. In this case ss->ei is overwritten in the
search() call and upon returning remains stale.

This patch could have a performance hit because Eval::Info
is big (176 bytes) and during splitting we copy 4 ss entries.

On the good side, this patch is a clean solution.

Proposed by Gary.

No functional change.
This commit is contained in:
Marco Costalba
2013-04-25 21:51:05 +02:00
parent d810441b35
commit 2ef53ee368
2 changed files with 5 additions and 8 deletions

View File

@@ -49,7 +49,7 @@ struct Stack {
Value evalMargin;
int skipNullMove;
int futilityMoveCount;
Eval::Info* ei;
Eval::Info ei;
};