The play sheet chooses Maia or Rodent IV, and Rodent's character in a full-screen list (docs/design/android-rodent.md, docs/decisions.md «Rodent IV на телефоне»). The engine is built from its authors' sources by androidApp/scripts/rodent4.sh (patches: no wordexp.h on bionic; the search thread took its parameter by reference, which clang builds read after it was gone) and ships in both APKs; the opening books are one checked download. Rodent's tables, its book manifest and its opponent loop move from the desktop into crates/play, shared by both apps; uci's EngineConfig takes an environment (RODENT4HOME). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
18 lines
813 B
Diff
18 lines
813 B
Diff
The search thread's lambda took the parameter p by reference, and StartThinkThread
|
|
returns at once: the thread then read p from a dead stack frame. GCC builds happened
|
|
to work; clang builds (the NDK's, AddressSanitizer: stack-use-after-return) searched
|
|
garbage and answered illegal moves (bestmove a1b1 from the start). Take p by value.
|
|
|
|
diff --git a/sources/src/rodent.h b/sources/src/rodent.h
|
|
index 30ccf22..3e100a0 100755
|
|
--- a/sources/src/rodent.h
|
|
+++ b/sources/src/rodent.h
|
|
@@ -981,7 +981,7 @@ class cEngine {
|
|
std::thread mWorker;
|
|
void StartThinkThread(POS *p) {
|
|
mDpCompleted = 0;
|
|
- mWorker = std::thread([&] { Think(p); });
|
|
+ mWorker = std::thread([this, p] { Think(p); });
|
|
}
|
|
|
|
~cEngine() { WaitThinkThread(); }; // should fix crash on windows on console closing
|