]> git.sesse.net Git - stockfish/commit
Fix a race when extracting PV from TT
authorMarco Costalba <mcostalba@gmail.com>
Fri, 17 Feb 2012 19:38:17 +0000 (20:38 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 18 Feb 2012 09:20:07 +0000 (10:20 +0100)
commitd8349f9d0f4eafda145de67330abcc2cb2d9ba56
tree9ad5b9c429165b27cae0daf521d1ae613e09c2bb
parentfd35d92c1e639d22ed10fb225272f08bd9afc885
Fix a race when extracting PV from TT

Because TT table is shared tte->move() could change
under our feet, in particular we could validate
tte->move() then the move is changed by another
thread and we call pos.do_move() with a move different
from the original validated one !

This leads to a very rare but reproducible crash once
every about 20K games.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp