OLD-7263: restore old upstream PR 7263 - gamedata_blobs: Region 1's lowest cell offset decides where Region 3 starts #714
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/714"
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 aslan2142 on 2026-11-24T12:45:10Z.
Claimed in the coordination issue as: OLD-7263 https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7131834439
Restoration of my original pull request, old upstream PR 7263 in
ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at21625bca8c; the commit applied without conflicts and the code is unchanged; only the commit message changed, citing the old finding's number as plain text.What and why
parse_spatial_grid_blobfound Region 3 as the trailing run of 4-byte-aligned words below the blob size.docs/gamedata.mdlocates Region 3 as the trailing run matchingmin(cell_offs). The run is now only the search range. Region 3 starts at the lowest start in it where Region 1 (which ends at the lowest Region 3 word) has that start as its lowest cell offset.Tested
Linux, Python 3.14, CPU only, synthetic blobs built in the test (no game files):
python -I tests/test_gamedata_blobs.py: on main with only this PR's test changes, 4 of 10 tests error (three colliding-word subtests and the multi-word Region 2 tail). On this branch, all 10 pass.python -m compileall -q tools tests,git diff --checkandpython -I scripts/check_no_game_data.pyon the changed files: clean.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)AI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T22:24:24Z.
Merged:
gamedata_blobs: Region 1's lowest cell offset decides where Region 3 starts.main, and no review point is open.tests/test_gamedata_blobs.pypasses onmain+ this head (Linux, CPython 3.14).maineaa3792fd+15f30f0a9: the semantic suite passes (492 files, 6,315 tests, 0 files failed);test_gamedata_blobspass; the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 2 changed files.AI-assisted (Claude Code, Claude Opus 5.5).