refactor(loader): preserve pointer provenance in LoadedImage and validate entry point early #605

Open
github-bot wants to merge 1 commit from github-bot/gh-605 into main AGit
Owner

@⁠angryduck1 on GitHub · 2026-12-04 17:23 UTC · original
angryduck1:refactor/loaded-image-provenance → main · +23 −7 · 1 files · 1 commits · open

Summary

  • Replaced integer-based entry point arithmetic (self.base() + entry_rva) with pointer-based .byte_add() in LoadedImage::entry_point() to preserve pointer provenance according to Rust's strict provenance guidelines.
  • Encapsulated entry point lookup and added explicit type annotations to std::mem::transmute.
  • Validated entry_point() in spawn_main before allocating an OS thread and stack so images without an entry point fail fast.

Validation

  • Built the release binary and Windows launcher cleanly.
  • Ran 8 targeted loader tests (including retail image validation) — all passed.
  • Verified repository asset policy checks.
**@⁠angryduck1** on GitHub · 2026-12-04 17:23 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/605) `angryduck1:refactor/loaded-image-provenance` → `main` · +23 −7 · 1 files · 1 commits · open ### Summary - Replaced integer-based entry point arithmetic (`self.base() + entry_rva`) with pointer-based `.byte_add()` in `LoadedImage::entry_point()` to preserve pointer provenance according to Rust's strict provenance guidelines. - Encapsulated entry point lookup and added explicit type annotations to `std::mem::transmute`. - Validated `entry_point()` in `spawn_main` before allocating an OS thread and stack so images without an entry point fail fast. ### Validation - Built the release binary and Windows launcher cleanly. - Ran 8 targeted loader tests (including retail image validation) — all passed. - Verified repository asset policy checks.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 17:26:41 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/605/head:github-bot/gh-605'
git switch 'github-bot/gh-605'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-605'
git switch 'github-bot/gh-605'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-605'
git switch 'github-bot/gh-605'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-605'
git switch 'main'
git merge --squash 'github-bot/gh-605'
git switch 'main'
git merge --ff-only 'github-bot/gh-605'
git switch 'main'
git merge 'github-bot/gh-605'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.