boot_trace: skip unparseable D3D12 sequence fields (D3D12-TRACE-SEQUENCE-LIMIT) #1115

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

@⁠Taffyyy-ops on GitHub · 2026-11-24 18:43 UTC · original
Taffyyy-ops:fix/d3d12-trace-sequence-limit → main · +69 −1 · 2 files · 1 commits · open

Item ID: D3D12-TRACE-SEQUENCE-LIMIT

Hardens tools/boot_trace.py:parse_d3d12() against corrupted D3D12 trace sequence numbers whose digit count exceeds sys.get_int_max_str_digits().

Changes

  • tools/boot_trace.py (parse_d3d12): Wraps int(match.group(1)) in try ... except ValueError, treating oversized/unparseable sequence fields as ignored_lines instead of aborting trace parsing, while preserving subsequent valid trace calls.
  • tests/test_boot_trace_sequence_limit.py: Adds synthetic unit tests verifying that malformed oversized sequence lines are ignored without losing valid calls before/after or breaking sequence gap accounting.

Verification

  • AI-assisted; synthetic tests only, no game data (python -I scripts/check_no_game_data.py).
**@⁠Taffyyy-ops** on GitHub · 2026-11-24 18:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1115) `Taffyyy-ops:fix/d3d12-trace-sequence-limit` → `main` · +69 −1 · 2 files · 1 commits · open Item ID: `D3D12-TRACE-SEQUENCE-LIMIT` Hardens `tools/boot_trace.py:parse_d3d12()` against corrupted D3D12 trace sequence numbers whose digit count exceeds `sys.get_int_max_str_digits()`. ### Changes - **`tools/boot_trace.py` (`parse_d3d12`):** Wraps `int(match.group(1))` in `try ... except ValueError`, treating oversized/unparseable sequence fields as `ignored_lines` instead of aborting trace parsing, while preserving subsequent valid trace calls. - **`tests/test_boot_trace_sequence_limit.py`:** Adds synthetic unit tests verifying that malformed oversized sequence lines are ignored without losing valid calls before/after or breaking sequence gap accounting. ### Verification - AI-assisted; synthetic tests only, no game data (`python -I scripts/check_no_game_data.py`).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:38:58 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 18:48 UTC · original · approved these changes

Reviewed and verified. Prevents ValueError crash on trace lines where corrupted sequence digits exceed Python's sys.get_int_max_str_digits() conversion limit. Handling the exception and treating the line as ignored_lines preserves later valid trace calls. Clean synthetic test in ests/test_boot_trace_sequence_limit.py. 100% clean room compliant.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 18:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1115#pullrequestreview-6045321106) · **approved these changes** Reviewed and verified. Prevents ValueError crash on trace lines where corrupted sequence digits exceed Python's sys.get_int_max_str_digits() conversion limit. Handling the exception and treating the line as ignored_lines preserves later valid trace calls. Clean synthetic test in ests/test_boot_trace_sequence_limit.py. 100% clean room compliant.
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:16 UTC · original

Recommendation: [MERGE]

Reasoning: boot_trace treats an unparseable sequence number (e.g. above Python's int digit limit) as an ignored line instead of crashing. Tiny tool hardening with a synthetic test. The PR description is minimal ("Automated PR from local workspace"); please give future PRs a real description. #1124 edits the same file in a different hunk. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 2/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:16 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1115#issuecomment-7143286489) **Recommendation:** [MERGE] **Reasoning:** `boot_trace` treats an unparseable sequence number (e.g. above Python's int digit limit) as an ignored line instead of crashing. Tiny tool hardening with a synthetic test. The PR description is minimal ("Automated PR from local workspace"); please give future PRs a real description. #1124 edits the same file in a different hunk. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 2/10
Author
Owner

@⁠Taffyyy-ops on GitHub · 2026-11-25 10:44 UTC · original

@⁠abnalstlll-byte @⁠Deedlyy Thanks for the review and [MERGE] recommendation! Updated the PR description with a full summary of the tools/boot_trace.py sequence-limit fix and tests/test_boot_trace_sequence_limit.py.

**@⁠Taffyyy-ops** on GitHub · 2026-11-25 10:44 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1115#issuecomment-7160118849) @⁠abnalstlll-byte @⁠Deedlyy Thanks for the review and `[MERGE]` recommendation! Updated the PR description with a full summary of the `tools/boot_trace.py` sequence-limit fix and `tests/test_boot_trace_sequence_limit.py`.
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/1115/head:github-bot/gh-1115'
git switch 'github-bot/gh-1115'

Merge

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