From afbcc4a93d840f52b2579530d638654a4a1e5447 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 28 Mar 2024 17:08:04 +0100 Subject: 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. --- prog/prog.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'prog/prog.go') 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, -- cgit mrf-deployment