gpu(tests): size native test pools for >=16 KiB pages under x86_64 Rosetta #23
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by claytonblythe on 2026-11-26T09:31:41Z.
Closes #19.
Root Cause
This is a test-only issue (the real x86_64 game binary is unaffected):
Pool::newintests.rs,pool()intitle_tests.rsandtexture_tests.rs) allocatedpages * page_size()bytes and then wrote at fixed offsets16384(dst) and32768(done).arm64,page_size()is 16 KiB, so4 * page_size() == 64 KiBcovers those offsets.x86_64Rosetta,sysconf(_SC_PAGESIZE)reports 4 KiB, so4 * page_size() == 16 KiB, puttingdst = 16384anddone = 32768past the end of the mapping and triggeringSIGSEGV/ unmapped-pool failures.Fix
page_size().max(16384)as the per-page unit in the test pool helpers (always a multiple of the host page size on both 4 KiB x86_64 and 16 KiB arm64).Testing
VICTORY_MSC_DYLIB=... cargo test --target x86_64-apple-darwin -p victory-gpu --lib -- --test-threads=1: 140 passed, 0 failed (was 4 FAILED + SIGSEGV).cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings: 0 warnings.cargo xtask policy: 363 files ok.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-26T09:36:37Z.
Review: APPROVED
Tested: victory-gpu passes on x86_64 under Rosetta and on arm64. Thanks!