Repository navigation
raise the fault of an emulated clzero at the title's instruction - #1773
imjustprism wants to merge 1 commit into
Conversation
VIctory V2: community PRs, merged and testedOpen PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: Unofficial community fork of Marvisak/VIctory, GPL-3.0. |
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (70564ae, Windows 11 x64, Rust 1.98.1 MSVC):
cargo test -p victory-loader— all 30 tests passed, 0 failed (includingzero_line_zeroes_the_whole_line_that_holds_its_address,a_single_step_inside_the_line_stores_is_not_a_store_fault, anda_store_fault_keeps_its_whole_record)cargo clippy -p victory-loader --all-targets— 0 warningscargo xtask policy— ok
Clean fault recovery and exception-record preservation for emulated clzero cache-line zeroing with thorough unit tests. Looks good.
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (70564ae).
cargo test -p victory-loader --locked → 0 passed, 3 failed — the 3 failures are the PRE-EXISTING macOS loader ones (prepare::tests parse Mach-O as PE, broken on main for months), not this PR. Static read of the 28K diff: emulate_with_record + victory_zero_line raise the fault of an emulated clzero at the title's instruction pointer via AddVectoredExceptionHandler — the zero_line_zeroes_the_whole_line_that_holds_its_address test names the semantics. Windows-only path; a real clzero fault test on Windows would be the proof.
496ae1c to
b07e5a9
Compare
a store of the emulated write that faults is caught by the handler, and its code and parameters go into the title's record, so later handlers see the fault at the title's clzero. the clzero loops stop at the line that faults, with the registers and flags their passes leave there.
b07e5a9 to
35ead91
Compare
an emulated clzero whose write faults (unwritable line, guard page, non-canonical rax) died inside our handler as a fatal crash at our own store, so a later handler never saw it and the report named the wrong address. the stores now sit in one small asm routine; a fault in it is caught and its code and parameters go into the title's record at its clzero, so later handlers see the fault the real instruction raises and can fix the page and retry.
rebased over #214: the two clzero loops go through the same routine and stop at the line that faults, with the registers and flags their passes leave there (nothing touched when the first line faults).
fault records of a single clzero were compared with a real clzero on a ryzen 7 9800x3d (zen 5); the loop state follows from the instruction order and was not compared with a real loop. zen 2 was not measured, and the handler has not run on an intel host; the tests reach it through a ud2 stub. handlers registered ahead of ours still only see the nested fault in our routine, and a clzero into the thread's own last stack guard page is not recovered. gate green on windows, 708 passed.