pub fn build_plan(
findings: &[Finding],
min_confidence: Confidence,
arch: Arch,
patcher: &mut dyn BytePatcher,
) -> Result<PatchPlan>Expand description
Construct a PatchPlan from a slice of findings.
Each finding is gated by:
is_actionable()— only opaque / dead / constant kinds.confidence <= min_confidence(using theOrdsemantics inr2smt-core, which placeHighlowest).- The presence of an instruction-size measurement (the patcher needs to know how many bytes to preserve).
arch selects the rewrite ISA: x86 / x86_64 use the legacy
jcc / setcc / cmovcc strategies; AArch64 / AArch32 use
the ARM b.<cond> / b<cond> / cbz / cbnz / tbz / tbnz
strategies (NOP-out for always-false, replace with b <target>
for always-true). ARM setcc / cmovcc analogs (cset /
csel) are deferred and surface as “no rewrite strategy” skips.
The function never writes to the binary. Callers use apply_plan
to commit operations.
§Errors
Returns the first failure produced by the BytePatcher while
measuring instruction size or assembling replacement bytes.