Scripts: follow reachable record-writer fallback calls #2650
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2660"
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 ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T05:16:22Z.
The record-writer inspector's fallback slot scan takes the first indirect call in the next 12 listed instructions. That can name an unreachable call after a return or unconditional jump. Walk reachable instructions from the fallback target, following direct branches within the same bounded search.
What is in it
ud2traps, and unconditional jumps, including common objdump prefix spellings.Tested
b49be183, the new unreachable-decoy cases reported slot 8 instead of unknown. The first patch version missed reachable calls after jumps; independent review caught that and the final fixtures now cover them. Prefixedrepz retandbnd jmpwere also verified before finalizing.ud2decoy fixture failed on the first PR revision and passed after recognizing the trap as a path terminator. On this branch, full Python script discovery passed 26/26 on Windows and Ubuntu under WSL.git diff --checkand independent source review passed.Regression run
Not tested
AI use
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:32:39Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:36:46Z.
Triage (#1607) – head
1070cc5No open PR changes the fallback-slot scan. #1730 also adds a ret check, but in the site's cursor-update search, not the fallback scan, and the lines shared with it are test listing boilerplate. #2049 keeps the linear 12-instruction scan.
The new scan follows fall-through and direct jump targets from the
jaetarget and stops at ret/ud2, so it no longer picks up a call from the next block. The test covers ret,repz ret, ud2, jmp,bnd jmp, jne and a jmp-to-self loop. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:09:29Z.
merge-check
base:
1c8b551475head:
1070cc57ffmerge: clean (
git merge --no-editonto1c8b5514,git diff --checkclean;scripts/re/record_writers.pyandscripts/test_record_writers.py, +56/-3)build: not run (Tier 0 Python script diff; no Rust code changed)
tests:
python -m unittest discover -s scripts -p "test_record_writers.py" -v-> 2 passed, 0 failed (base1c8b5514: 1 passed; newtest_fallback_only_takes_reachable_callspassed with 9 subtests);python -m unittest discover -s scripts -p "test_*.py"-> 66 passed, 1 error (test_discord_mirror.pymissing%ComSpec%/%SystemRoot%on Windows, same failure on base1c8b5514). Rust workspace tests not run (Tier 0).review: Read the full diff (+56/-3). Replaces the linear 12-instruction scan from the
jaefallback target with a 12-instruction BFS (scripts/re/record_writers.py:16,57-82) that strips x86 prefixes, stops atret/retq/ud2, skips fall-through after unconditionaljmp/jmpq, and follows directj*/loop*targets without revisiting indices. Prevents picking up an unreachable indirect call from the following block. All 9 subtests pass cleanly. No problems found.performance: none (offline analysis script in
scripts/re/; zero runtime impact)verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Python 3.15.2, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.