]> git.sesse.net Git - stockfish/commitdiff
Fix incorrect StateInfo
authorMarco Costalba <mcostalba@gmail.com>
Mon, 14 Aug 2017 16:12:16 +0000 (09:12 -0700)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 15 Aug 2017 06:01:58 +0000 (23:01 -0700)
We use Position::set() to set root position across
threads. But there are some StateInfo fields (previous,
pliesFromNull, capturedPiece) that cannot be deduced
from a fen string, so set() clears them and to not lose
the info we need to backup and later restore setupStates->back().
Note that setupStates is shared by threads but is accessed
in read-only mode.

This fixes regression introduced by df6cb446eaf21

Tested with 3 threads at STC:
LLR: 2.95 (-2.94,2.94) [-4.00,0.00]
Total: 14436 W: 2304 L: 2196 D: 9936

Bench: 5608839


No differences found