As noticed in the forum, a crash in extract_ponder_from_tt could result
if hash size is set before the ponder move is printed. While it is arguably
a GUI issue (but it got me on the cli), it is easy to avoid this issue.
Closes https://github.com/official-stockfish/Stockfish/pull/1856
No functional change.
while (size() < requested)
push_back(new Thread(size()));
clear();
- }
- // Reallocate the hash with the new threadpool size
- TT.resize(Options["Hash"]);
+ // Reallocate the hash with the new threadpool size
+ TT.resize(Options["Hash"]);
+ }
}
/// ThreadPool::clear() sets threadPool data to initial values.
#include "bitboard.h"
#include "misc.h"
+#include "thread.h"
#include "tt.h"
#include "uci.h"
void TranspositionTable::resize(size_t mbSize) {
+ Threads.main()->wait_for_search_finished();
+
clusterCount = mbSize * 1024 * 1024 / sizeof(Cluster);
free(mem);