d3d12_xs_rootsig: remove duplicate checksum check rejecting all-zero-checksum Xbox blobs #235

Closed
github-bot wants to merge 1 commit from github-bot/gh-235 into main AGit
Owner

@⁠Andretuta on GitHub · 2026-11-24 02:50 UTC · original
ubiquitarianism:old-pr/9968 → main · +0 −11 · 1 files · 1 commits · closed without merging

Carried over from old PR 9968 by liamhob in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9968, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
liamhob: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

What and why

On \main\ (\2d53a8055),
oot_sig\ fails 2 checks:

  • \FAIL blob helper rewrites an all-zero-checksum Xbox blob and keeps its zero checksum\
  • \FAIL shim deserializer accepts an all-zero-checksum Xbox blob with the high byte cleared\


untime/shims/d3d12_xs_rootsig.cpp\ had a duplicate pre-loop DXBC checksum verification (lines 149-153) left from a merge alongside the inner-loop check (lines 174-182). The pre-loop check rejected all-zero-checksum containers before the inner check (which explicitly allows \kZeroHash) could run. This removes the redundant pre-loop hash check, unused \min_chunk_off, and duplicate \ otal_size\ check.

Verification

  • Windows 11, MSVC 19.44, Ninja (tested with #9857 applied to build on MSVC):
    • \ctest -R ^root_sig$: PASS (0.10 s, 0 failures).
    • \git diff --check: clean.
  • Synthetic test only; no game files. AI-assisted.
**@⁠Andretuta** on GitHub · 2026-11-24 02:50 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/235) `ubiquitarianism:old-pr/9968` → `main` · +0 −11 · 1 files · 1 commits · closed without merging > Carried over from **old PR 9968** by `liamhob` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9968`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `liamhob`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): ### What and why On \main\ (\2d53a8055\), \ oot_sig\ fails 2 checks: - \FAIL blob helper rewrites an all-zero-checksum Xbox blob and keeps its zero checksum\ - \FAIL shim deserializer accepts an all-zero-checksum Xbox blob with the high byte cleared\ \ untime/shims/d3d12_xs_rootsig.cpp\ had a duplicate pre-loop DXBC checksum verification (lines 149-153) left from a merge alongside the inner-loop check (lines 174-182). The pre-loop check rejected all-zero-checksum containers before the inner check (which explicitly allows \kZeroHash\) could run. This removes the redundant pre-loop hash check, unused \min_chunk_off\, and duplicate \ otal_size\ check. ### Verification - Windows 11, MSVC 19.44, Ninja (tested with `#9857` applied to build on MSVC): - \ctest -R ^root_sig$\: **PASS** (0.10 s, 0 failures). - \git diff --check\: clean. - Synthetic test only; no game files. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:49:50 +00:00
Author
Owner

@⁠qhukz13 on GitHub · 2026-11-25 09:33 UTC · original

For whoever triages the carried-over drafts: this patch no longer applies to main (runtime/shims/d3d12_xs_rootsig.cpp:146), because main already dropped the duplicate checksum and size checks in copy_rts0_blob_clear_xbox_flags, and the two checks this PR names now pass there (measured on Windows 10 19045, GTX 1050 Ti: PASS blob helper rewrites an all-zero-checksum Xbox blob and keeps its zero checksum, PASS shim deserializer accepts an all-zero-checksum Xbox blob with the high byte cleared). The one root_sig failure left on Windows 10 is a different check, handled in a new PR. AI-assisted (Claude Code).

**@⁠qhukz13** on GitHub · 2026-11-25 09:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/235#issuecomment-7158501260) For whoever triages the carried-over drafts: this patch no longer applies to `main` (`runtime/shims/d3d12_xs_rootsig.cpp:146`), because `main` already dropped the duplicate checksum and size checks in `copy_rts0_blob_clear_xbox_flags`, and the two checks this PR names now pass there (measured on Windows 10 19045, GTX 1050 Ti: `PASS blob helper rewrites an all-zero-checksum Xbox blob and keeps its zero checksum`, `PASS shim deserializer accepts an all-zero-checksum Xbox blob with the high byte cleared`). The one `root_sig` failure left on Windows 10 is a different check, handled in a new PR. AI-assisted (Claude Code).
github-bot closed this pull request 2026-11-27 04:04:19 +00:00
Author
Owner

@⁠Andretuta on GitHub · 2026-11-27 04:02 UTC · original

Closing carried-over draft: fix already landed on main (copy_rts0_blob_clear_xbox_flags passes both checks).

**@⁠Andretuta** on GitHub · 2026-11-27 04:02 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/235#issuecomment-7209466385) Closing carried-over draft: fix already landed on `main` (`copy_rts0_blob_clear_xbox_flags` passes both checks).

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.