Loader (diagnostics): VICTORY_STEP_OVER steps over listed title breakpoints (#698) #2644
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
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
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
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/Marvisak--VIctory!2644
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2644"
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?
@Pierrot1398 on GitHub · 2026-11-25 17:29 UTC · original
Pierrot1398:loader/step-over→main· +74 −0 · 2 files · 2 commits · openFrom a tester working with Claude (AI-assisted); measured on my own machine.
Refs #698. The approach is slauko's, described in #698 (a vectored-handler step over the title's own
int3); this is an implementation of it on currentmain.Problem
In the world, the title stops with
0x80000003at+0x63966for+0x5149aec(Series 1.0.2.1), several threads at once, its crash report showing a pool at its limit. Both offsets are a loneint3on the allocator's own NULL-return path:+0x63966f:ccthenxor ebx, ebx; jmpback to the function's return (mov rax, rbx; ...; ret);+0x5149aec:int3thenxor edi, edi; mov rax, rdi(slauko's disassembly in #698).Stepped over, the allocation returns NULL and the caller goes on.
Change
Diagnostics builds only, off unless set:
VICTORY_STEP_OVER=<hex offset>[,<hex offset>…].crates/victory-loader/src/crash.rs) checks it right after the AMD-only instruction emulation.VirtualQuery,MEM_IMAGE), its offset from that image'sAllocationBaseis a listed one, and the byte there really is0xCC.Ripthen moves past it and the handler returnsEXCEPTION_CONTINUE_EXECUTION.stepped over the title's breakpoint (VICTORY_STEP_OVER)).Nothing else about exceptions changes; with the variable unset the handler does exactly what it did before.
Measured
RTX 5060 Ti 8 GB (driver 621.24), Ryzen 7 5700G, 13.9 GB RAM, Windows 11 26300, diag build,
VICTORY_STEP_OVER=63966f,5149aec, on a tree with the open NVIDIA fixes (#1832, #1763, #2332, #1779, #1906, #1922, #233, #2178).0x80000003at+0x63966fafter 6–12 min, 7 threadsThe runs end later on host GPU failures of their own (memory on this 8 GB card, a freed-texture page fault as in #557), not on the trap.
As slauko noted, this is a way around the stop, not its cause: the pool stays full, so what asked for it after that point is not drawn.
cargo xtask policy,cargo clippy -p victory-loader --features diagnostics -- -D warningsandcargo test -p victory-loader --features diagnosticspass.🤖 Generated with Claude Code
https://claude.ai/code/session_011f6R3kMoarujHzzA1AvSBb
@kotekompotek on GitHub · 2026-11-25 17:48 UTC · original
Verified live on Series 1.0.2.1 (diag build + this patch):
VICTORY_STEP_OVER=1ce6e13,2224517,1d5cc69,22106e0,2219650walked the boot chain — each site logged with its count, the run continued past all five into a later0xc0000005(a different, real failure downstream of the same missing service registration). The offset-via-AllocationBase arithmetic and the0xCCbyte check before stepping both behaved correctly.Design notes from use: (1) sites listed but never hit stay silent — a 'listed but not hit' summary at exit would help catch typos; (2) stepping over an
int3mid-function continues into whatever follows, which is exactly right for assert-style sites like these (check → int3 → normal path).This is the right tool for the assert chain in #2613 — poke-free, no writes to RX pages.
@Marvisak on GitHub · 2026-11-25 23:23 UTC · original
Automated triage for the maintainers.
This adds
step_overto the vectoredhandlerincrates/victory-loader/src/crash.rs, compiled only with thediagnosticsfeature and inert unlessVICTORY_STEP_OVERis set: anEXCEPTION_BREAKPOINTis resumed past theint3only when it lies in aMEM_IMAGEregion (the title is loaded withLoadLibraryExWinwindows.rs, soAllocationBaseis its image base), the offset is listed and the byte is really0xCC. With the variable unset the handler behaves as before; it adds no dependency and no new unsafe pattern beyond whatcrash.rsalready does. One small point a maintainer may want trimmed: the README table row carries an explanation of #698 that is longer than its neighbours. CI (check) passes.This is a recommendation for a maintainer to look, not an approval.
Generated by Claude Code
@futurepro62 on GitHub · 2026-11-26 01:19 UTC · original
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
26bd942(on its base13f91ca).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 773 passed, 0 failed, 9 ignored.#[test]functions in the diff.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
@fuzeofficlal on GitHub · 2026-11-26 16:20 UTC · original · approved these changes
Reviewed
26bd942f566c0f28bf30595de4e549528da2913e(merged cleanly onto63bcca43c6a00a758510398fa43096ce7e4f7df0) and verified on Windows 11 x64 (rustc 1.98.1MSVC).Audit
crates/victory-loader/src/crash.rs:538,:547,:581,:607:#[cfg(feature = "diagnostics")]and short-circuits immediately whenVICTORY_STEP_OVERis unset/empty, keeping default builds and normal runs unaffected.step_oververifiesEXCEPTION_BREAKPOINT,VirtualQueryreturningMEM_IMAGE, RVA match againstAllocationBase, and that the byte atExceptionAddressis literally0xCCbefore advancingctx.Rip += 1(and only whenctx.Rip as usize == at), with bounded log frequency (n <= 3 || n.is_power_of_two()).trim_start_matches("0x")skips uppercase0Xprefixes (though0x,+0x, bare hex, and uppercase hex digits all parse cleanly).Verification
63bcca43c6a00a758510398fa43096ce7e4f7df0+cargo run -p xtask -- policy(191 files ok)cargo clippy -p victory-loader --all-targets -- -D warnings(default &--all-features)cargo test -p victory-loader: 39/39 passed (default), 41/41 passed (--all-features).MEM_IMAGEprobe against the test binary's own.textsection verifiedVICTORY_STEP_OVERparsing (+0x..., uppercase hex, whitespace, empty/invalid/overflow tokens) and confirmedstep_overrejects non-breakpoint exceptions, heap0xCCbytes, and listedMEM_IMAGERVAs that are not0xCC, while returningtrueand advancingctx.Ripby1(without double-advancing whenRip != ExceptionAddress) on a listed0xCCbyte.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.