Repository navigation
Conversation
The exception event carried the code, the faulting address and the stack, which says where a trap happened but not what led to it. A trap in guest code (an int3 filler, a bad indirect call) is only diagnosable with the operands, and the CONTEXT the stack already comes from has them: record rax, rcx, rdx, r8, r9, rsp and rbp alongside it. Measured on the retail executable: the first run stops at game_scarlett_master.exe+0x1e1d3a7 with rax=0, rcx=0x32, which is the null reservation described in xmem.cpp.
docs/boot.md listed the exception event's fields as code, at, access/address and the stack frames. The previous commit added regs to it, so name them where the event is described.
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.
The
exceptionevent carried the code, the faulting address and the stack. That says where a trap happened, not what led to it: a trap in guest code (anint3filler, a bad indirect call, a wild read) is only diagnosable with the operands, and theCONTEXTthe stack already comes from has them.Record
rax,rcx,rdx,r8,r9,rspandrbpalongside the stack, in the same event, from the sameContextRecord. No new event, no new flag, no change to what is recorded when the trace is off.Why these seven
They are the argument registers of the x64 calling convention plus the two that frame the call, so a shim call site and a guest trap are both readable from the record.
r10/r11are scratch andr12-r15are callee-saved, so they say less about the call that failed.Measured on the retail executable
Two stops, both on
mainatdde82f27e, Windows 11 26300, RX 9070 XT, MSVC 14.51:game_scarlett_master.exe+0x1e1d3a7withrax=0,rcx=0x32. The stack alone showed a trap inside a jump-table region;rax=0is what identified it as the thirdXMemVirtualAllocreturning NULL (attributes0x183,allocation_type 0x20003000, 2 MiB pages), which is the blocker xmem: serve the seven missing imports (physical pages, default allocators, XMemIsToolsMemAvailable); XMemVirtualAlloc takes 2 MiB pages and placeholders #6919 fixed.main, one stop is0xc0000005read at+0x51d1adcwithrax=0x3a433b3436782d32— little-endian32 2d 78 36 34 3b 43 3a, i.e.2-x64;C:, the tail of a path string. The guest is dereferencing achar*where a structure pointer was expected. The stack names the call chain; only the register says the value is text.The second one is the reason for the PR: the same stop reads
-1,0x8a000000000and0x7a0078across runs, and without the register the difference between "uninitialised pointer" and "a string used as an object" is invisible.Checks
ctest -R "startup_trace|int3|loader|boot_trace"ondde82f27e+ this commit: 6/6 pass. The existingstartup_tracetest asserts fields withhas(...), so an added field does not disturb it.runtime/ctest: the same five failures as unmodifieddde82f27eon this machine (vk_queue_query_sync,d3d12_vulkan_device,d3d12_texture_tiles,d3d12_indirect_dispatch_count,d3d12_pipeline_library_host), all reproduced on the baseline commit — driver-side, not from this change.docs/boot.md§8.Claimed as RT-5 in #7496: #7496 (comment)
AI-assisted (Claude Code). No game files, no package contents, no shader or asset data are included.