diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-03-13 19:06:12 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-03-14 09:58:39 +0000 |
| commit | afb4ef03152e930503768785ac23933a8a35e52c (patch) | |
| tree | 5a58b4a3254a1d100ac21b628bbdeb4def2ed26f /pkg/fuzzer | |
| parent | 8d8ee1167660b892b706638362d61fd150a905af (diff) | |
prog: enable MutateWithHints() abortion
The call may potentially generate a very large number of possible
mutations. Add a way to abort the process.
Diffstat (limited to 'pkg/fuzzer')
| -rw-r--r-- | pkg/fuzzer/job.go | 8 |
1 files changed, 2 insertions, 6 deletions
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 }) } |
