diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-03-28 17:08:04 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-04-03 11:26:05 +0000 |
| commit | afbcc4a93d840f52b2579530d638654a4a1e5447 (patch) | |
| tree | c2dcaea20bb86ba9cd1626516da4a1bfd79a3b98 /prog/prog.go | |
| parent | 77aa13ea89f1d7c7df4a17a6a83a11bf965d38d3 (diff) | |
pkg/fuzzer: don't triage saturated calls
Currently we throw away saturated calls only after triage/minimization.
Triage/minimization is unnecessary for saturated calls,
we already know we will throw them away later.
Don't send saturated calls for triage/minimization.
Diffstat (limited to 'prog/prog.go')
| -rw-r--r-- | prog/prog.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/prog/prog.go b/prog/prog.go index 6b4853c7a..880e02eeb 100644 --- a/prog/prog.go +++ b/prog/prog.go @@ -14,6 +14,16 @@ type Prog struct { Comments []string } +func (p *Prog) CallName(call int) string { + if call >= len(p.Calls) || call < -1 { + panic(fmt.Sprintf("bad call index %v/%v", call, len(p.Calls))) + } + if call == -1 { + return ".extra" + } + return p.Calls[call].Meta.Name +} + // These properties are parsed and serialized according to the tag and the type // of the corresponding fields. // IMPORTANT: keep the exact values of "key" tag for existing props unchanged, |
