Skip to content

[AUTOMATED] Add the engine hooks a differential checker needs - #2107

Open
sjkim1127 wants to merge 1 commit into
Noelo-Lab:mainfrom
sjkim1127:diffverify-hooks
Open

sjkim1127 wants to merge 1 commit into
Noelo-Lab:mainfrom
sjkim1127:diffverify-hooks

Conversation

@sjkim1127

Copy link
Copy Markdown
Contributor

The first of four pieces that #1830 is split into. It adds the hooks a differential checker needs from the engine. With every hook unset, kuna emits exactly what it emits today.

cd decompiler && cargo test -p kuna-decomp kuna_rulecap
  • Rule cap (infra/kuna_rulecap.rs): when armed on the current thread, it counts each rule application by name and address, in order. It can also let one named rule apply only its first n times while everything else runs. ActionPool::process_op checks it once per rule attempt. Unarmed (the only state kuna uses), that check is one thread-local flag read.
  • Funcdata::vararg_folded: the record of the register-save stores that the varargsave fold removes. With it, a reader of the IR can put back what va_start means.
  • kuna_narrowext::rules_for(arch, mode): the narrowing rules for a given mode, not only the architecture's current one.
  • Console: IfaceStatus::last_command holds the words of the command just run. interface::quote_filename is the quoting kuna-cli already used, moved where other callers can reach it.

The spec describes the rule cap (00-overview.md) and the fold record (04-calls-and-prototypes.md). make test and make test-stages are unchanged, at 675/675 and parity.

🤖 Generated with Claude Code

Model: anthropic/claude-opus-5-5

A rule cap that counts rule applications per thread and can stop one rule
after its first n, checked once per rule attempt in ActionPool::process_op
and inert unless armed; Funcdata::vararg_folded, the register-save stores the
varargsave fold removes; kuna_narrowext::rules_for for a given mode;
IfaceStatus::last_command; and interface::quote_filename, moved from kuna-cli
so other callers can reach it. With every hook unset kuna's output is
unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant