]> git.sesse.net Git - stockfish/commit - src/search.h
Store Eval::Info in Search::Stack
authorMarco Costalba <mcostalba@gmail.com>
Thu, 25 Apr 2013 19:51:05 +0000 (21:51 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 25 Apr 2013 19:52:26 +0000 (21:52 +0200)
commit2ef53ee368683d5aa62b028377b94efe961f18ac
treeeda554c64992786f4769f7919787efe9a6c386c1
parentd810441b359508577b736d7b6410190ba13078f5
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.
src/search.cpp
src/search.h