Repository navigation
feat(loader): VICTORY_STEP_OVER steps over the title's full-pool traps (int3 then xor r, r) - #284
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
int3is followed byxor 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:poolsteps over any breakpoint in a title image that is followed by an instruction zeroing a register (31/33with both ModRM fields the same, under a REX prefix that extends both or neither).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 indocs/macos.md.Tested:
cargo test -p victory-loaderpasses. The run that stopped at+0x5149aecis the one this is for. A rerun withVICTORY_STEP_OVER=poolis in the world now; I will add its result here.🤖 Generated with Claude Code