windows-boot: recover private stacks for manually mapped images #1772
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1772
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/windows-boot-mapped-image-stack"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as WIN-BOOT-MAPPED-IMAGE-STACK.
Depends on: #1693 (produces the private exception dump).
What and why
The initial stack can stop inside a PE that the runtime mapped outside the Windows module list. A new offline command takes the private dump and the exact mapped PE. It matches captured instructions to a unique location in an executable section, derives the actual base, and checks for a file-backed x64 unwind entry at the exception RIP. Available header and unwind bytes must agree with the local image.
The tool gives x64 CDB a fixed staging name, disables network symbols and shell commands, selects the saved exception context, and writes the recovered frames to a new private file. Console output contains the outcome and frame count. The Windows boot README documents the command and its limits, including exit-only snapshots and dumps with insufficient instruction bytes.
Tested
GPUs tested: n/a (CPU-only synthetic Windows debugging).
AI-assisted: yes
Checklist
#1772 | head 056e6823217b5f2a1fd9b2556ba71fd41a757877 (merged cleanly with main 24549bdb1) |
python -I tests/test_mapped_stack.py| red on main:ModuleNotFoundError: No module named 'mapped_stack'(rc=1) | green on PR+main:8 tests OK (skipped=1)| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
scripts/windows-boot/mapped_stack.py,scripts/windows-boot/README.md, andtests/test_mapped_stack.py(validating local-only drive/path checks viaGetDriveTypeW, checkout-outside enforcement, minidump stream/bounds parsing, relocated mapping-base inference,.pdata/.xdatacorroboration, sanitized CDB environment/command construction, and exclusiverenamepublication;cdb.exeis not installed on this host so the 7 synthetic PE32+/minidump tests ran and the optionalLEONIDA_TEST_CDBtest skipped cleanly). Also verifiedtests/test_docs_encoding.py(1 OK),tests/test_ci_registration.py(18 OK),tests/test_runner_calls_all_tests.py(3 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Merged after local re-verification: this PR merged onto
main1a0e77ecb without conflict, and its test file(s) (tests/test_mapped_stack.py) pass there. Earlier today the same tests failed onmainwithout the PR (red/green) and a bundle with other open PRs showed no new failures.check_no_game_data.pyis clean. Windows 11, Python 3.14; no GPU needed for these tests.AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.