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. --- pkg/fuzzer/job.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'pkg') diff --git a/pkg/fuzzer/job.go b/pkg/fuzzer/job.go index 5a8f610b0..a0295affb 100644 --- a/pkg/fuzzer/job.go +++ b/pkg/fuzzer/job.go @@ -385,17 +385,13 @@ func (job *hintsJob) run(fuzzer *Fuzzer) { // Then mutate the initial program for every match between // a syscall argument and a comparison operand. // Execute each of such mutants to check if it gives new coverage. - var stop bool p.MutateWithHints(job.call, result.Info.Calls[job.call].Comps, - func(p *prog.Prog) { - if stop { - return - } + func(p *prog.Prog) bool { result := fuzzer.exec(job, &Request{ Prog: p, NeedSignal: true, stat: statHint, }) - stop = stop || result.Stop + return !result.Stop }) } -- cgit mrf-deployment