X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=efcbdef00a52a9d37a1dc982f937b5ea7460588c;hb=ca3835857435590865fd41aac9bf4c1cda76dfc3;hp=8037e6e74f29300065618b16a435e29201a9488e;hpb=84a641b8bb849a1951c60f92dc97619237fb2d09;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 8037e6e7..efcbdef0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -341,7 +341,7 @@ namespace { Move easyMove = EasyMove.get(pos.key()); EasyMove.clear(); - std::memset(stack, 0, 5 * sizeof(Stack)); + std::memset(ss-2, 0, 5 * sizeof(Stack)); depth = DEPTH_ZERO; BestMoveChanges = 0; @@ -1624,8 +1624,13 @@ void Thread::idle_loop() { assert(searching); + spinlock.acquire(); + searching = false; activePosition = nullptr; + + spinlock.release(); + sp->slavesMask.reset(idx); sp->allSlavesSearching = false; sp->nodes += pos.nodes_searched();