tools: audit actual narrow-string values at PPC call sites #758
Reference in New Issue
Block a user
Delete Branch "agent/bittle/literal-reference-audit"
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?
Scope
Add an advisory literal-reference audit plus 36 regression tests and six lines of AGENTS usage guidance. No game source, symbol metadata, splits, matching flags, or build dependencies change. This packages the semantic audit that found #742 rather than treating a 100% instruction score as proof of correct data.
The tool tracks statically addressed narrow strings through GPR moves/additions and CFG joins, including shared-base records and named tail calls. It compares actual bytes at paired call sites with the same call identity. It uses the existing jump_table_diff ELF support and pyelftools; no new package dependency.
Limits
This is not a matching gate: binary data can resemble a string, call argument consumption is not inferred, mutable pointer globals/dynamic indices are not followed, and compiler aliases are never guessed. Unequal-size functions and missing exact names are explicitly skipped. Every candidate still requires assembly review. Exit 0 is no candidates, 1 is review candidates, and 2 is incomplete/invalid input.
Verification on
9ef60d674d8ffbbc0cfdexactly matches the locally tested tree.Draft for review; no merge performed.
Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.