Skip to content

feat(loader): VICTORY_STEP_OVER steps over the title's full-pool traps (int3 then xor r, r) - #284

Merged
pragyaangaur merged 1 commit into
pragyaangaur:mainfrom
derz92:feat/step-over-pool
Nov 26, 2026
Merged

pragyaangaur merged 1 commit into
pragyaangaur:mainfrom
derz92:feat/step-over-pool

Conversation

@derz92

@derz92 derz92 commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

With the over-limit mesh fix (#282), a run on an M5 Max gets into the opening's world and stays there. About 20 minutes in, it then stops on the title's own trap: unhandled exception 0x80000003 at victory-image-b99f876b74d4a77f.dll+0x5149aec.

That int3 is followed by xor edi, edi. It is the allocator of a fixed-size pool (the instance lists', reported as Marvisak/VIctory#698) trapping when the pool is full and then returning NULL. Its caller (+0xa5db22) already tests the result for NULL. On the console the trap is a no-op; here, without a debugger, it ends the process. The pool fills when frames take seconds.

This adds VICTORY_STEP_OVER, off unless set:

  • pool steps over any breakpoint in a title image that is followed by an instruction zeroing a register (31/33 with both ModRM fields the same, under a REX prefix that extends both or neither).
  • A comma list of hex offsets steps over exactly those.

Each step-over is logged: the first three times, then at powers of two.

It is a port of Ahmet-Dedeler/VIctory 0d216a5d, which carries alexodee's handler idea from fxceless/victory-fork#378, adapted to the current crash.rs. Images register with the handler as they are mapped (threads::mapped), so offsets resolve in a lock-free lookup inside the vectored handler. Documented in the switch table in docs/macos.md.

Tested: cargo test -p victory-loader passes. The run that stopped at +0x5149aec is the one this is for. A rerun with VICTORY_STEP_OVER=pool is in the world now; I will add its result here.

🤖 Generated with Claude Code

…s (int3 then xor r, r)

Retail 1.0.2.1 traps at 5149aec when its instance lists' pool fills, a
few minutes into the opening when frames take seconds (Marvisak/VIctory#698).
The trap sits on the allocator's way out; stepping over it gives the caller
the NULL it already checks for. Ported from Ahmet-Dedeler/VIctory 0d216a5d.
Off unless set: VICTORY_STEP_OVER=pool, or a list of hex offsets.
@pragyaangaur
pragyaangaur merged commit b0d0f36 into pragyaangaur:main Nov 26, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants