Commit Graph

7 Commits

Author SHA1 Message Date
e78ca1ee90 Merge pull request #2318 from syfyra/fix/inline-scan-copy-before-load
inline_scan: follow a list copied before the cursor load (INLINE-SCAN-COPY-BEFORE-LOAD)
2026-12-01 16:18:30 +01:00
757ffc364b inline_scan: support UTF-8 BOM, clean up dumpbin Popen on early close, and validate --base 2026-11-26 19:59:20 +08:00
1efc629096 inline_scan: follow a list copied before the cursor load (INLINE-SCAN-COPY-BEFORE-LOAD)
classify() walks back from a cursor store-back and took the load
`mov rax,[rcx+18h]` as the list's cursor only if rcx was already in
`bases` at that point. A copy `mov rbx,rcx` that comes before the load is
met after it on the way back, so the load counted as another structure's
+18h, the site lost load_traced and an unchecked write of that shape was
reported as `unrelated`: the summary said "UNCHECKED 0" for a write that
never checks. A checked write of the same shape was already found,
because the compare pass runs forwards over the final `bases`.

Record the load's base and check it once the walk has collected every
register the list was copied through. A load from a register that never
held the list is still another structure, as before.

Tested: new test_list_copied_before_the_cursor_load_is_still_unchecked
(fails before the fix for the copy-before-load order, passes after) and
test_cursor_loaded_from_another_structure_is_not_a_list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 12:28:44 +01:00
009b101dec Merge pull request #3218 from CLHelper 2026-11-22 17:00:57 -05:00
dac28e6b19 Fix what the round-42 merges broke (tests and docs)
- shader_disasm: prune stale listings against every input, not the --skip-existing remainder (a resumed run
  deleted every listing it had just reused).
- progress_dashboard: a drive-letter path is never inside the repository off Windows (it printed user names);
  its own read_text helper is read_utf8, so the encoding check does not take it for pathlib's.
- Translator tests follow this round's rules: desc_lookup's BroadcastFirst in the typed-load condition walker;
  resinfo sizes are 0 past the last level and a 2D depth word is 0 (SHADER-388); SHADER-315 constant folding in
  the perm and i16 tests; #2089's structured wave64 emulation.
- test_semantic_translator_use: 57 oracle-only files merged before it are DEBT; test_spirv_tools_required is
  allowed (CI meta-test).
- Test fixes: image_fuzz fake writes the programs, preflight follows c506d00c's loader hint rule, feature_scan
  reads the first line of a pytest-decorated message, w64_graphics wording.
- docs: rows merged again in design.md, README.md, d3d12_vulkan.md; GameInput table rebuilt from #3172's rows;
  orphan rows in models.md and embedded_shaders.md; repeated bullets; anchors; a flag not on main.
- Repo rules: stdout guard on 14 programs; LF writes; csv lineterminator in bink_play.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:14:54 -05:00
d4dfcea7bd fix(tools): inline_scan exits 2 when it reads no instructions
An empty file, a text file that is not a dumpbin listing, or a PE dumpbin
prints no code for gave "list sites 0: checked 0, UNCHECKED 0" and exit 0,
the same as a clean image. The scan now counts the instructions it reads,
prints the count, and exits 2 with a message when there are none.
2026-11-22 20:19:45 +00:00
ca438076bc feat(tools): inline_scan finds inline command-list writes and whether each checks the cursor limit
The package's DLLs check before every inline write (BVH builder 196/196, FSR 9/9), so a layer that keeps
the cursor at the limit sees every command. Whether the game's executable does the same was open until it is
available; inline_scan answers it in one pass over a dumpbin listing. Baseline in d3d12_command_objects.md,
day-one step in design.md.
2026-11-22 19:37:55 +00:00