windows-boot: recover private stacks for manually mapped images #1772

Open
github-bot wants to merge 1 commit from github-bot/gh-1772 into main AGit
Owner

@⁠sodove on GitHub · 2026-11-25 11:48 UTC · original
sodove:feat/windows-boot-mapped-image-stack → main · +540 −0 · 3 files · 1 commits · open

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

  • All eight mapped-stack tests passed on Windows 11 Pro x64. The native CDB test used a hand-built, relocated PE absent from the minidump module list and recovered its caller through the disk unwind table. The synthetic PE was never executed.
  • The tests also cover both minidump memory-list formats, code and header mismatches, duplicate code windows, missing unwind metadata, registered module conflicts, incomplete debugger output, a filename containing debugger command separators, and preservation of an existing report.
  • All three text-writer checks and all 22 report-path tests passed. Python compilation, the no-game-data check on all three changed files, and the whitespace check passed.
  • Verified clean merge trees with main at ed94fbef9 and the current #1693 head.

GPUs tested: n/a (CPU-only synthetic Windows debugging).

AI-assisted: yes

Checklist

  • Based on upstream main and checked for merge conflicts.
  • One topic.
  • No game data, keys or decryption in the change, tests or report.
**@⁠sodove** on GitHub · 2026-11-25 11:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1772) `sodove:feat/windows-boot-mapped-image-stack` → `main` · +540 −0 · 3 files · 1 commits · open Claimed in the coordination issue as [WIN-BOOT-MAPPED-IMAGE-STACK](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608). 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 - All eight mapped-stack tests passed on Windows 11 Pro x64. The native CDB test used a hand-built, relocated PE absent from the minidump module list and recovered its caller through the disk unwind table. The synthetic PE was never executed. - The tests also cover both minidump memory-list formats, code and header mismatches, duplicate code windows, missing unwind metadata, registered module conflicts, incomplete debugger output, a filename containing debugger command separators, and preservation of an existing report. - All three text-writer checks and all 22 report-path tests passed. Python compilation, the no-game-data check on all three changed files, and the whitespace check passed. - Verified clean merge trees with main at ed94fbef9 and the current #1693 head. GPUs tested: n/a (CPU-only synthetic Windows debugging). AI-assisted: yes ### Checklist - [x] Based on upstream main and checked for merge conflicts. - [x] One topic. - [x] No game data, keys or decryption in the change, tests or report.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:04:23 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1772/head:github-bot/gh-1772'
git switch 'github-bot/gh-1772'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1772'
git switch 'github-bot/gh-1772'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1772'
git switch 'github-bot/gh-1772'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1772'
git switch 'main'
git merge --squash 'github-bot/gh-1772'
git switch 'main'
git merge --ff-only 'github-bot/gh-1772'
git switch 'main'
git merge 'github-bot/gh-1772'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.