OLD-7301: psin_psch: reject overlapping PMAP blocks and duplicate consumed sections #873
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!873
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/873/head"
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?
@narekshaghoyandev on GitHub · 2026-11-24 14:52 UTC · original
narekshaghoyandev:ubiq-psin-psch-pmap-overlap-and-dup-sections→main· +50 −1 · 2 files · 1 commits · merged 2026-11-24 21:04 UTCReopening my original upstream PR #7301 (previously approved by
@devnull34, refined per@SirKingg's review, and re-verified 57/57 on retail PSIN streams by@Kev-Ball), cleanly rebased ontomain:PMAPblocks: Sorts non-empty (length > 0)PMAPblocks by offset and rejects any true byte-range overlap regardless of table row order (allowing empty blocks and non-monotonic non-overlapping rows).PMAP,PSCH,PSIG,STNS,STDN,STFN) instead of silently overwriting earlier sections in the section dict, while allowing repeated unknown/ignored section tags.Verification
python3 -I tests/test_psin_psch.py -v: 4/4 pass (negative control onmainfails ontest_rejects_overlapping_pmap_blocks_and_duplicate_known_sections).python3 -I scripts/check_no_game_data.py tools/psin_psch.py tests/test_psin_psch.py: clean.python3 -m compileall -q tools/psin_psch.py tests/test_psin_psch.py: clean.Claimed in the coordination issue as: OLD-7301 (#14)
AI-assisted: yes (Gemini)
@KernelSmoker on GitHub · 2026-11-24 14:56 UTC · original · approved these changes
Reviewed exact head
f16674ec39787400cf9b18dea36e1d0116a7ce81against base8f05e09e224656740e8a53f5047e1338d7a52588. PMAP blocks are checked as half-open byte ranges after sorting non-empty entries, preserving disjoint out-of-order/empty blocks; duplicate rejection is limited to sections the parser consumes, while unknown repeated sections remain accepted.python3 -I tests/test_psin_psch.py -vpasses 4/4; Python compilation andgit diff --checkpass. All fixtures synthetic; CPU-only. Hosted checks were pending at review time.@abnalstlll-byte on GitHub · 2026-11-24 14:57 UTC · original · approved these changes
Audited and verified. Rejects overlapping non-empty PMAP blocks in ools/psin_psch.py:decode_pmap and raises ValueError on duplicate consumed sections in parse_psch_container rather than silently overwriting. Unit tests in ests/test_psin_psch.py pass cleanly. Approved.
@QemmHD on GitHub · 2026-11-24 21:04 UTC · original
Merging.
Why merged: OLD-7301: psin_psch rejects overlapping non-empty PMAP blocks and duplicate consumed sections, so malformed input is refused instead of misread. KernelSmoker approved this exact head.
Why it's good: Pure parsing. Own tests: 4 passed.
Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main
66d4f5aa3. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests) gives 573 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main0b45fdc21: no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls, new env vars or build/CI changes.AI-assisted (Claude Code, Claude Opus 5.5).