mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:55:52 +01:00
[PR #1679] mem_diff: narrow skip catch to UnsupportedConstruct, guard memory/export compares, deduplicate families #1693
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#1693
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/1679
Author: @IlyassRS3
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/mem-diff-compare-and-harness-errors📝 Commits (1)
c064f07mem_diff: narrow skip catch to UnsupportedConstruct, guard memory/export compares, deduplicate families📊 Changes
2 files changed (+61 additions, -6 deletions)
View changed files
📝
tests/test_mem_diff.py(+53 -0)📝
tools/mem_diff.py(+8 -6)📄 Description
Item ID:
MEM-DIFF-COMPARE-AND-HARNESS-ERRORS(claimed in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156347986)Summary
run_fragmentskip handling (tools/mem_diff.py):spirv_mini_interp.UnsupportedConstructinstead of broadExceptioninrun_one()(matchingtools/shader_diff.py), so real interpreter/harness failures (RuntimeError,AssertionError,KeyError, etc.) surface asharness-error(exit2) instead of being silently downgraded to"skip".IndexErrorcrashes inrun_one()comparison logic:(memory.get(a, 0) & MASK32) != (ref.mem.get(a, 0) & MASK32)) before indexingbad[0], preventing anIndexError: list index out of rangewhenever one side explicitly stores0at an unseeded address absent from the other side.%out_mrt0exports (len(got) > 4whose first 4 words matchwant) by reporting"export shape mismatch: expected 4 words, translated N"instead of crashing onbad[0], and mask exported words to 32 bits (MASK32).--familyselections:familiesviasorted(set(families))ingenerate_program()so repeated--familyflags do not skew random family sampling.tests/test_mem_diff.py):CompareAndHarnessRegressioncoveringUnsupportedConstructvs unexpectedRuntimeErrorharness error, zero-valued extra memory entries, overlong%out_mrt0exports, and duplicate--familydeduplication.Checklist & Verification
python3 -I scripts/check_no_game_data.py tools/mem_diff.py tests/test_mem_diff.pypassed)python3 -W error -I tests/test_mem_diff.py -v:Ran 23 tests ... OKCompareAndHarnessRegressionagainst unpatchedmaintools/mem_diff.py):Ran 4 tests ... FAILED (failures=1, errors=3)python3 -m compileall -q make_game.py tools tests: passedpython3 -I tests/test_text_write_line_endings.py:Ran 3 tests ... OK🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.