diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2024-07-12 15:21:28 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2024-07-15 12:35:21 +0000 |
| commit | 1b48db7358a2e8add30b5649419664286019873d (patch) | |
| tree | bdb214da73c4d536eaf6406d0a4448609989989f /pkg/repro | |
| parent | b70dd0c87bfef506bde0691d981466e5f537a01d (diff) | |
pkg/repro: don't minimize to 0 calls
Minimizing to 0 calls leads to an empty execution log, which leads to an
immediate exit of tools/syz-execprog, which would be recognized as "lost
connection to machine".
Diffstat (limited to 'pkg/repro')
| -rw-r--r-- | pkg/repro/repro.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go index 5ef2a52b8..3b0c47e02 100644 --- a/pkg/repro/repro.go +++ b/pkg/repro/repro.go @@ -434,6 +434,11 @@ func (ctx *reproContext) minimizeProg(res *Result) (*Result, error) { res.Prog, _ = prog.Minimize(res.Prog, -1, prog.MinimizeParams{Light: true}, func(p1 *prog.Prog, callIndex int) bool { + if len(p1.Calls) == 0 { + // We do want to keep at least one call, otherwise tools/syz-execprog + // will immediately exit. + return false + } crashed, err := ctx.testProg(p1, res.Duration, res.Opts) if err != nil { ctx.reproLogf(0, "minimization failed with %v", err) |
