loader(hooks): nop debug int3 assertion before common exit #248
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!248
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/248/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?
@Androtim on GitHub · 2026-11-30 11:50 UTC · original
Androtim:feat/iter242-loader-nop-assert-exit→main· +92 −12 · 2 files · 1 commits · merged 2026-11-30 12:07 UTCSummary
PatchSiteandapply_siteshelper incrates/victory-loader/src/hooks.rs, keeping theBUILD_1_0_2_1BLAKE3 check and exact byte-signature guard.ASSERT_EXIT(+0x4dcbc97, length 9) replacing theint3(0xCC) before the common exit jump withnop(0x90), avoiding fatal0x80000003breakpoint traps on host setups where that assertion fires during play (VICTORY_NOP_ASSERT_EXIT=0disables it).nop_assert_exitduring title image mapping incrates/victory-loader/src/windows.rs.assert_exit_flag_defaults_on_and_honors_zero,assert_exit_patch_only_nops_int3_byte, and non-matching build coverage inunknown_build_skips_watchdog_hooks.Verification
cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy:asset policy: 313 files okcargo +1.98.1-x86_64-pc-windows-gnu test -p victory-loader --lib hooks::: all tests passedcargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings: exit 0cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings: exit 0@Androtim on GitHub · 2026-11-30 12:04 UTC · original
Automated triage for the maintainers (not an approval).
Verdict:
merge-candidate· CI (check):passingSummary
Clean, tightly scoped loader hook addition with passing CI.
Review Notes
crates/victory-loader/src/hooks.rs): ExtractingPatchSiteandapply_siteskeepsdisarm_watchdogandnop_assert_exitsharing the sameBUILD_1_0_2_1BLAKE3 prefix gate, bounds checks inwrite_site, exact byte-signature verification,VirtualProtectrestore, andFlushInstructionCache.ASSERT_EXIT): At+0x4dcbc97(9 bytes:mov eax, [rsp+0x2c]; jmp -0x1d; int3; jmp -0x16), only byte index 6 (+0x4dcbc9d) changes from0xCC(int3) to0x90(nop), preserving instruction boundaries and relative jump offsets.crates/victory-loader/src/windows.rs):nop_assert_exitruns only for non-DLL images (!loaded.info.is_dll()) immediately afterLoadLibraryExWand before any title code executes, matching thedisarm_watchdogsafety invariant.VICTORY_NO_WATCHDOG(opt-in),VICTORY_NOP_ASSERT_EXITdefaults to enabled and is disabled with=0. Unit tests cover flag parsing (assert_exit_flag_defaults_on_and_honors_zero), the single-byte0xCC -> 0x90invariant (assert_exit_patch_only_nops_int3_byte), and unknown-build no-op behavior (unknown_build_skips_watchdog_hooks).crates/victory-loader/src/hooks.rsstill saysOpt-in compatibility hooks, whereasVICTORY_NOP_ASSERT_EXITis opt-out.(Automated triage review; not formal maintainer approval.)
Generated with Antigravity CLI (
agy).