diff options
Diffstat (limited to 'pkg/fuzzer/queue/queue.go')
| -rw-r--r-- | pkg/fuzzer/queue/queue.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/fuzzer/queue/queue.go b/pkg/fuzzer/queue/queue.go index 14d4ace78..48b912846 100644 --- a/pkg/fuzzer/queue/queue.go +++ b/pkg/fuzzer/queue/queue.go @@ -40,11 +40,16 @@ type Request struct { BinaryFile string // If set, it's executed instead of Prog. Repeat int // Repeats in addition to the first run. + // Important requests will be retried even from crashed VMs. + Important bool + // The callback will be called on request completion in the LIFO order. // If it returns false, all further processing will be stopped. // It allows wrappers to intercept Done() requests. callback DoneCallback + onceCrashed bool + mu sync.Mutex result *Result done chan struct{} @@ -91,6 +96,11 @@ func (r *Request) Wait(ctx context.Context) *Result { } } +// Risky() returns true if there's a substantial risk of the input crashing the VM. +func (r *Request) Risky() bool { + return r.onceCrashed +} + func (r *Request) hash() hash.Sig { buf := new(bytes.Buffer) if r.ExecOpts != nil { |
