Loader: continue past a title's int3 asserts, for finding the next blocker #1156
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!1156
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1156"
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?
@adamdotpy on GitHub · 2026-11-24 16:17 UTC · original
adamdotpy:loader/title-asserts→main· +100 −0 · 2 files · 2 commits · openAI-assisted; measured on my own machine (Windows 11, Rust 1.98.1).
What
Titles assert with
int3where a check failed. Without a debugger the first one ends the process, so every "it stops atvictory-image-….dll+0x1ce6e13" report needs someone to reverse the check before anything can be said about it.VICTORY_TITLE_ASSERTS=<n>continues past up tonof them: the byte at the faulting address is checked for0xccbefore anything is skipped — a debugger's breakpoint patches the code, so the byte there is the instruction it replaced, and that still ends the process — then the instruction is skipped and the check is taken as passed, so its caller keeps the value it computed. Each skip is logged with the address and the count left. Off by default, and the README row says what it is for.It sits in
crash::handlernext toemulate_amd_only, which is the same shape of thing: the host doing something the console's CPU would not, and the vectored handler being the one place that sees it first.Testing
cargo test -p victory-loader: 23 passed in the lib (with the newa_title_int3_is_skipped_while_the_budget_lasts, which pins the0xcccheck, the exception-code check, and that the budget is spent only where it is used), 2 and 1 in the next targets.cargo clippy -p victory-loader --all-targets --all-features --locked -- -D warnings: clean.cargo build --release -p victory: builds.rustfmt --edition 2024 --checkon the file adds no diff of mine; the six it reports are pre-existing in this file.What it shows on the title here
Default, unchanged: dies at the first assert,
0x80000003 at victory-image-b99f876b74d4a77f.dll+0x1ce6e13, as before.VICTORY_TITLE_ASSERTS=8:Five assert sites, then a write to
0x20out ofVCRUNTIME140.dll— the null-ish destination the last check existed to prevent, which is the failure mode the doc comment warns about. The useful outcome is that the crash moved somewhere new and the addresses now come out of a log instead of an afternoon of reverse engineering. It does not get the world running and is not meant to; it points at whatever those five checks were guarding.Opt-in precisely because a run that gets past failed checks is not a run to trust. I would not want it on by default, and the commit says so.
@Zipettte on GitHub · 2026-11-24 18:01 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
2f29526:cargo test -p victory-loaderpasses, 26 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@Marvisak on GitHub · 2026-11-25 00:37 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-loader/src/crash.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
@Key-rs on GitHub · 2026-11-25 06:45 UTC · original
A rebased copy of this branch is up as #2165 (Key-rs:loader/title-asserts-rebased), on current main (
940d32f), because this PR is CONFLICTING.The conflict is a single spot in crates/victory-loader/src/crash.rs: main grew a let code = …; let to_file = … block at the top of handler, and this patch inserts if unsafe { past_assert(info) } { return -1; } in the same place. #2165 keeps main's block whole and puts the skip ahead of it, which is also the order that matters (a skipped assert should not be reported first-chance on the way past).
No behaviour change is intended — same two commits, same switch, same log line.
If you would rather take the rebase into this PR directly, tell me and I will close #2165; I have no interest in competing with it, only in not leaving the generic switch unrebasable while three machines trap at +0x1330A44.
One data point in favour of it landing: with a narrower variant of the same idea (xceless/victory-fork#719, which nops the two jumps into that specific int3), the same build on a Ryzen 7 8845H + RTX 4060 goes past the assert into the first-boot screens, the legal notices and the game itself, at 30 fps for 325 s with no crash log. So the check is survivable in the strong sense and "continue and see" is the right tool here.
AI-assisted.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.