loader tests: probe the forced range far above where allocations go #283
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/283"
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 maaalrey on 2026-11-27T08:44:17Z.
What this changes
Refs #281
native::image::tests::malformed_relocations_return_error_and_release_mappingfails about 1 run in 3 onmain. Step 3 fails withfailed maps must release their range: mapping 0x4000 bytes of image at 0x1…: mach_vm_allocate failed: kern_return 3(KERN_NO_SPACE).The test picks its forced address by allocating anywhere and releasing it. That range is the next one the system hands out, so another test's allocation, made between the release and step 3, takes it. The test now probes fixed ranges from
0x5000_0000_0000up, which allocations made anywhere don't reach. Step 3 can then fail only if one of the failed maps kept the range, which is what it checks. Test-only change.How it was tested
cargo test -p victory-loader --lib(arm64): 5 failures in 12 runs before, 0 in 30 aftercargo test --target x86_64-apple-darwin -p victory-hle -p victory-loader -p victory: 380 passed, 0 failedcargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings: cleancargo xtask policy: okChecklist
VICTORY_*variable and documented (none)Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T10:32:27Z.
Thank you. A test-only change, and 0 failures in 30 runs after 5 in 12 is the evidence I wanted. Your workflow has not run; it needs my approval. The branch is behind main, please update it. I have not run it.
Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by maaalrey on 2026-11-27T10:50:40Z.
Updated: main (
ce2b786) merged in. Since then,cargo test -p victory-loader --libhas 0 failures in 15 runs (arm64),cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warningsis clean with and without--all-features, andcargo xtask policyis ok. Thanks for the review.