Add the local_mp_air_ai_sync native module to serialize calls to
TeamAiManager::addToUnsortedPlanes with an exclusive SRWLOCK on LocalMP
hosts.
Root cause (verified on 2.61.0.60, 2.61.0.58, and 2.61.0.37):
Aircraft physics and AI updates run concurrently across worker threads
via threadpool::parallel_for. When bot aircraft finish their behavior
tree (such as right after an aircraft crashes), AirAi::update tail-calls
TeamAiManager::addToUnsortedPlanes, which locks the global unit table
for lookup but mutates the team's shared unsortedPlanes
dag::Vector<uint32_t> (including reserve/HeapReAlloc) without a lock.
Under 32-bot LocalMP air battles, concurrent reallocations on this
vector corrupt the Windows heap (0xC0000374).
Also guard resolve_offender_killer in local_mp_kills.c with an
install-time check that LMP_OFFENDER_STRIDE <= LMP_OFFENDER_BUF_SIZE so
future struct growth skips cleanly instead of overflowing the stack
buffer.
Checks:
- MSVC /W4 build of wto_ws.dll (0 warnings in repository C files)
- Root and @wto/launcher npm run typecheck
- 15/15 native module resolution on 2.61.0.37 (0x807be0), 2.61.0.58
(0x80a2b0), and 2.61.0.60 (0x80a150), checkPatchSet, wtotools
check-patches on 2.61.0.60 (14/14), and temporary copy build
verification (build-game-copy.ts)
- Pending live multi-match air/nuclear-escalation acceptance in an
isolated copy.