gpu(tests): size native test pools for >=16 KiB pages under x86_64 Rosetta #23
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!23
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/23/head"
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?
@claytonblythe on GitHub · 2026-11-26 09:31 UTC · original
claytonblythe:fix/rosetta-gpu-test-pool-size→main· +6 −4 · 3 files · 1 commits · merged 2026-11-26 09:36 UTCCloses #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.@LakshanSivakumar on GitHub · 2026-11-26 09:36 UTC · original · approved these changes
Tested: victory-gpu passes on x86_64 under Rosetta and on arm64. Thanks!