loader test malformed_relocations_return_error_and_release_mapping fails about 1 run in 3 #281

Closed
opened 2026-11-27 08:43:56 +00:00 by maaalrey · 3 comments
maaalrey commented 2026-11-27 08:43:56 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by maaalrey on 2026-11-27T08:43:56Z.


native::image::tests::malformed_relocations_return_error_and_release_mapping fails intermittently on main (5 failures in 12 runs of cargo test -p victory-loader --lib on arm64). Step 3 reports failed maps must release their range: mapping 0x4000 bytes of image at 0x1…: mach_vm_allocate failed: kern_return 3.

Cause: the test picks its forced address by allocating anywhere and releasing it. That range is the next one handed out, so another test thread's allocation takes it before step 3.

Plan: probe fixed ranges far above where allocations made anywhere go (from 0x5000_0000_0000), so step 3 can only fail if a failed map kept the range. Test-only change; I have it ready (0 failures in 30 runs).

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6643025379 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/281). Originally posted by [maaalrey](https://github.com/maaalrey) on 2026-11-27T08:43:56Z. --- `native::image::tests::malformed_relocations_return_error_and_release_mapping` fails intermittently on `main` (5 failures in 12 runs of `cargo test -p victory-loader --lib` on arm64). Step 3 reports `failed maps must release their range: mapping 0x4000 bytes of image at 0x1…: mach_vm_allocate failed: kern_return 3`. Cause: the test picks its forced address by allocating anywhere and releasing it. That range is the next one handed out, so another test thread's allocation takes it before step 3. Plan: probe fixed ranges far above where allocations made anywhere go (from `0x5000_0000_0000`), so step 3 can only fail if a failed map kept the range. Test-only change; I have it ready (0 failures in 30 runs).
maaalrey commented 2026-11-27 08:44:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by maaalrey on 2026-11-27T08:44:05Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7213859940 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/281#issuecomment-7213859940). Originally posted by [maaalrey](https://github.com/maaalrey) on 2026-11-27T08:44:05Z. --- /claim
github-actions[bot] commented 2026-11-27 08:44:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T08:44:15Z.


Claimed by @maaalrey. Open a draft pull request with Refs #281 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7213863107 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/281#issuecomment-7213863107). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T08:44:15Z. --- Claimed by @maaalrey. Open a draft pull request with `Refs #281` in its description within 24 hours, or the claim expires.
LakshanSivakumar commented 2026-11-27 11:46:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T11:46:01Z.


Fixed by #283, which is merged into main: the test now probes the forced range far above where allocations land. Thank you @maaalrey. If the test still fails for anyone on current main, please reopen with the output.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7217450183 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/281#issuecomment-7217450183). Originally posted by [LakshanSivakumar](https://github.com/LakshanSivakumar) on 2026-11-27T11:46:01Z. --- Fixed by #283, which is merged into main: the test now probes the forced range far above where allocations land. Thank you @maaalrey. If the test still fails for anyone on current main, please reopen with the output.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#281
No description provided.