Repository navigation
Loader (diagnostics): VICTORY_STEP_OVER steps over listed title breakpoints (#698) - #2644
Pierrot1398 wants to merge 2 commits into
Conversation
…points GTA VI 1.0.2.1's pool allocator traps on an empty pool (int3 at +0x63966f and +0x5149aec, Marvisak#698) right before returning NULL. Stepped over, the allocation fails and the title goes on: on an RTX 5060 Ti this reaches the world (HUD and ambient sound). Off unless the variable is set; only an int3 in a mapped image at a listed offset is stepped over. After slauko's patch in Marvisak#698. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f6R3kMoarujHzzA1AvSBb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f6R3kMoarujHzzA1AvSBb
|
Verified live on Series 1.0.2.1 (diag build + this patch): 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 This is the right tool for the assert chain in #2613 — poke-free, no writes to RX pages. |
…r listed title breakpoints Code part of the PR at head 26bd942f (crates/victory-loader/src/crash.rs, applied as is; its README section conflicts here and is left out). The approach is slauko's on Marvisak/VIctory#698. Runs 10 and 11 here (RX 9070 XT, Proton Experimental, b394ba9 and 1e77d47) end at 639-643 s in the intro's prestream at the title's own int3 at +0x63966f, INSTANCE_LIST at 43,817-44,420/45,000; run 7 ended the same way at 45,000/45,000. With VICTORY_STEP_OVER=63966f,5149aec (diagnostics builds only, off unless set) the loader's vectored handler steps over that int3 when it lies in an image at a listed offset and the byte is 0xCC, so the allocation returns NULL and the title goes on. This works around the stop, not its cause: the pool stays full. Tested: cargo test -p victory-loader --features diagnostics under Wine, 23 passed. Not yet tested in the title. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. This adds This is a recommendation for a maintainer to look, not an approval. Generated by Claude Code |
|
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
…s over listed title breakpoints (#698) From Marvisak/VIctory#2644 (opened by Pierrot1398; original commits and authors kept). Not yet merged upstream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fuzeofficlal
left a comment
There was a problem hiding this comment.
Reviewed 26bd942f566c0f28bf30595de4e549528da2913e (merged cleanly onto 63bcca43c6a00a758510398fa43096ce7e4f7df0) and verified on Windows 11 x64 (rustc 1.98.1 MSVC).
Audit
crates/victory-loader/src/crash.rs:538,:547,:581,:607:- Gated behind
#[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()).
- Gated behind
- Minor non-blocking note:
trim_start_matches("0x")skips uppercase0Xprefixes (though0x,+0x, bare hex, and uppercase hex digits all parse cleanly).
Verification
- Clean merge onto
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).- Additional live
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.
From 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 World load on NVIDIA with no device removal: title breakpoint (0x80000003) after ~6.7 min, INSTANCE_LIST pool full (45000/45000) #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