From afb4ef03152e930503768785ac23933a8a35e52c Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Wed, 13 Mar 2024 19:06:12 +0100 Subject: prog: enable MutateWithHints() abortion The call may potentially generate a very large number of possible mutations. Add a way to abort the process. --- tools/syz-execprog/execprog.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/syz-execprog') diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go index f7952b675..b1c355a1b 100644 --- a/tools/syz-execprog/execprog.go +++ b/tools/syz-execprog/execprog.go @@ -251,11 +251,12 @@ func (ctx *Context) printHints(p *prog.Prog, info *ipc.ProgInfo) { fmt.Printf("\n") } } - p.MutateWithHints(i, comps, func(p *prog.Prog) { + p.MutateWithHints(i, comps, func(p *prog.Prog) bool { ncandidates++ if *flagOutput { log.Logf(1, "PROGRAM:\n%s", p.Serialize()) } + return true }) } log.Logf(0, "ncomps=%v ncandidates=%v", ncomps, ncandidates) -- cgit mrf-deployment