mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #888] OLD-7883: audit_shader4_regs: harden stage map loading, bound PSV0 reads, and write JSON atomically #926
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#926
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/888
Author: @narekshaghoyandev
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:ubiq-audit-shader4-regs-psv0-stagemap-and-atomic-json📝 Commits (1)
6c6d66faudit_shader4_regs: harden stage map loading, bound PSV0 reads, and write JSON atomically📊 Changes
2 files changed (+118 additions, -9 deletions)
View changed files
📝
scripts/audit_shader4_regs.py(+48 -9)📝
tests/test_audit_shader4_regs.py(+70 -0)📄 Description
Reopening my original upstream PR #7883 (previously verified on Windows 11 by
@TieruYT; zero overlap with #713--limit), cleanly rebased ontomain:load_stage_map): Readsindex.jsonwithutf-8-sig, guards malformed list entries and non-string/unhashablestagevalues, and catchesRecursionError.read_psv0): Rejects truncated DXBCPSV0chunks (off + 8 + plen > len(d)) and inner records whose declaredrsizeexceeds chunk payload bytes (4 + rsize > len(p)).write_json,main): Passesa.json_outdirectly toprotect_input, and publishes--jsonatomically viatempfile.mkstemp+file_mode.published_mode+replace_retry.replacewithallow_nan=Falseand read-only-safe temp cleanup.Verification
python3 -I tests/test_audit_shader4_regs.py -v: 23/23 pass (all 3 new tests fail/error againstmain).python3 -I scripts/check_no_game_data.py scripts/audit_shader4_regs.py tests/test_audit_shader4_regs.py: clean.python3 -m compileall -q scripts/audit_shader4_regs.py tests/test_audit_shader4_regs.py: clean.Claimed in the coordination issue as: OLD-7883 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7135201067)
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.