Fix errouneus reset of ss->threatMove

After we set ss->threatMove we could go under a IID step that
resets SearchStack ss and so also ss->threatMove.

When later we use that field in futility pruning we have this
set to MOVE_NONE !

The fix is to use a local variable and add threatMove to SplitPoint
to pass this move to slaves.

Spotted by Ralph Stoesser, fix suggested by Richard Vida.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2010-07-23 02:26:10 +01:00
parent 5c3aeae566
commit d004ec924d
3 changed files with 12 additions and 10 deletions

View File

@@ -55,6 +55,7 @@ struct SplitPoint {
bool pvNode, mateThreat;
Value beta;
int ply;
Move threatMove;
SearchStack sstack[MAX_THREADS][PLY_MAX_PLUS_2];
// Const pointers to shared data