mirror of
https://github.com/horizon-rust/horizon.git
synced 2026-11-07 11:06:11 -10:00
Since #4160 (10-29) the game's allocator is mimalloc v3, from libmimalloc-sys 0.1.49. Built by MSVC, its mi_popcount is `__popcnt64`, which MSVC turns into the POPCNT instruction whatever the target. mimalloc runs before main, so on a Core 2 (no POPCNT) the Windows game died at once with 0xc000001d and no log (#7264). v0.2.97 had no POPCNT at all; nightlies 2026-10-31 and 11-01 have 9. third_party/libmimalloc-sys is the published crate with one change: on MSVC x86/x64, mi_popcount takes mimalloc's portable count, as the GCC builds without -mpopcnt already do. Only arena bitmaps count bits, never malloc's fast path. [patch.crates-io] points at it until a release carries microsoft/mimalloc#1291. tools/check_cpu_baseline.py disassembles the Windows and Linux programs in the game build and fails on any POPCNT or LZCNT: it flags 2026-11-01's horizon-client.exe and passes v0.2.97's and the Linux builds. Fixes #7264 Co-Authored-By: Claude Opus 5.5 <[email protected]>