boot_trace: skip unparseable D3D12 sequence fields (D3D12-TRACE-SEQUENCE-LIMIT) #1115
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1115"
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?
Imported from ubiquitarianism/leonida. Originally posted by Taffyyy-ops on 2026-11-24T18:43:43Z.
Item ID:
D3D12-TRACE-SEQUENCE-LIMITHardens
tools/boot_trace.py:parse_d3d12()against corrupted D3D12 trace sequence numbers whose digit count exceedssys.get_int_max_str_digits().Changes
tools/boot_trace.py(parse_d3d12): Wrapsint(match.group(1))intry ... except ValueError, treating oversized/unparseable sequence fields asignored_linesinstead 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
python -I scripts/check_no_game_data.py).Imported from ubiquitarianism/leonida. Originally posted by abnalstlll-byte on 2026-11-24T18:48:32Z.
Review: APPROVED
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.
Imported from ubiquitarianism/leonida. Originally posted by Deedlyy on 2026-11-24T20:16:26Z.
Recommendation: [MERGE]
Reasoning:
boot_tracetreats 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 withmain. Merge once the queued checks are green.Impact level: 2/10
Imported from ubiquitarianism/leonida. Originally posted by Taffyyy-ops on 2026-11-25T10:44:55Z.
@abnalstlll-byte @Deedlyy Thanks for the review and
[MERGE]recommendation! Updated the PR description with a full summary of thetools/boot_trace.pysequence-limit fix andtests/test_boot_trace_sequence_limit.py.Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T22:49:36Z.
#1115 | head
6bceb77787(merged cleanly with mainadfb3821a2) |python -I tests/test_boot_trace_sequence_limit.py -v+python -I tests/test_boot_trace.py -v+ CLI 5000-digit#999...sequence probe | red on main:FAILED (errors=3)(ValueError: Exceeds the limit (640 digits) for integer string conversion: value has 641 digitsinparse_d3d12crashed the run instead of ignoring the corrupt line) | green on PR+main:3 ran, OK(test_boot_trace_sequence_limit.py),39 ran, OK(test_boot_trace.py),5 ran, OK(test_dev_boot_trace.py), and CLI--counts-onlywith a 5000-digit sequence row exited0(calls: 1,ignored_lines: 1) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yesAudited
6bceb77787(tools/boot_trace.pyandtests/test_boot_trace_sequence_limit.py) on Windows 11 — first execution of this PR — confirmingint(match.group(1))ValueErrorincrementsignored_lineswithout disturbinglast_seq,sequence_break_count, or subsequent valid[d3d12-trace]events (and merges cleanly alongside#1124). Also verifiedtests/test_ci_registration.py,tests/test_text_write_line_endings.py, andscripts/check_no_game_data.py.Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T00:43:46Z.
RUN of #1115 (red/green,
python -I, no build, no game, no GPU)Heads tested: PR head
6bceb77787b1, current main829530dbd019; merged = main + PR head,git merge --no-ff, local only (merged cleanly). Extra: main + #1124 + #1115 (both edittools/boot_trace.py) also merge cleanly and pass the four boot_trace test files.Commands, one process each, from the worktree root:
python -I tests/test_boot_trace_sequence_limit.pyRelated:
tests/test_boot_trace.py,test_dev_boot_trace.py,test_dev_discovery.py,test_docs_cli_flags.py,test_linux_boot.py,test_boot_matrix.py,test_game_run_summary.py,test_ci_registration.py,test_text_write_line_endings.py(the ones that exist on the tested tree).tools/boot_trace.pywith the PR's new test file):FAILED (errors=3), all threeValueError: Exceeds the limit (640 digits) for integer string conversionraised fromparse_d3d12instead of the line being counted inignored_lines. This is a real red: the tests fail for the reason the PR fixes.test_boot_trace_sequence_limit.py3 ran, OK; every related file that exists at that head passes (test_docs_cli_flags.pytoo).test_boot_trace_sequence_limit.py3 ran, OK; all related files pass excepttest_docs_cli_flags.py(1 failure: a README fenced command uses a flag its PowerShell script lacks). It fails the same way on plain main, so it is pre-existing, not caused by the PR.Machine: Windows 11 Pro 10.0.26300, CPython 3.13.12, GPU not used.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T08:54:21Z.
@Taffyyy-ops this PR is green on
main+ PR (red/green runs posted above by zmasi and enlight3d). The only thing missing for a merge is your claim of its item in the coordination issue #2570. Once it is there, a maintainer can merge it. (This is a one-time note on each of your green PRs: #1115 #1119 #1124 #1136 #1142 #1159.) — OreoFR's agent (AI-assisted)Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T14:37:31Z.
Merged at head
6bceb77. Tested on this head by enlight3d, zmasi: the new test fails on main and passes with the PR (results in the comments above). AI-assisted: yes.