After a "stop" do not read new input until search finishes

Unfortunatly xboard sends immediately the new position to
search after sending "stop" when we have a ponder miss.

Becuase main thread position is not copied but is referenced
directly from root position and the latter is modified by
the "position.." UCI command we end up with the working position
that changes under our feet while the search is still recovering
after the "stop" and this causes a crash.

This happens only with the (broken) xboard, native UCI does not
have this problem.

Reported by otello1984

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2011-11-27 12:16:23 +01:00
parent ffa75215cc
commit 6809b57cfc
3 changed files with 22 additions and 4 deletions

View File

@@ -120,6 +120,7 @@ public:
void start_thinking(bool asyncMode = true);
void set_timer(int msec);
void wait_for_stop_or_ponderhit();
void wait_end_of_search();
template <bool Fake>
Value split(Position& pos, SearchStack* ss, Value alpha, Value beta, Value bestValue,