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

Closed
Andretuta wants to merge 1 commit from upstream-pr/235 into main
Andretuta commented 2026-11-24 02:50:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:50:40Z.


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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465158023 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/235). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:50:40Z. --- > 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.
qhukz13 commented 2026-11-25 09:33:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-25T09:33:55Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7158501260 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/235#issuecomment-7158501260). Originally posted by [qhukz13](https://github.com/qhukz13) on 2026-11-25T09:33:55Z. --- 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).
Andretuta commented 2026-11-27 04:02:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-27T04:02:09Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7209466385 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/235#issuecomment-7209466385). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-27T04:02:09Z. --- Closing carried-over draft: fix already landed on `main` (`copy_rts0_blob_clear_xbox_flags` passes both checks).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!235
No description provided.