diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2021-12-01 17:25:40 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2021-12-10 12:30:07 +0100 |
| commit | 18f846ca807cfc6df9c3da3c0ab08251277dfefb (patch) | |
| tree | e14f783b914409f21ae77a01a6b74ededaba6901 /prog/minimization.go | |
| parent | 52c8379f77b5f292e2d527c66dfe17a899381d20 (diff) | |
all: add the `rerun` call property
To be able to collide specific syscalls more precisely, we need to
repeat the process many times.
Introduce the `rerun` call property, which instructs `syz-executor` to
repeat the call the specified number of times. The intended use is:
call1() (rerun: 100, async)
call2() (rerun: 100)
For now, assign rerun values randomly to consecutive pairs of calls,
where the first one is async.
Diffstat (limited to 'prog/minimization.go')
| -rw-r--r-- | prog/minimization.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/prog/minimization.go b/prog/minimization.go index 89ed6e142..26a4dfc93 100644 --- a/prog/minimization.go +++ b/prog/minimization.go @@ -120,6 +120,15 @@ func minimizeCallProps(p0 *Prog, callIndex, callIndex0 int, pred func(*Prog, int } } + // Try to drop rerun. + if props.Rerun > 0 { + p := p0.Clone() + p.Calls[callIndex].Props.Rerun = 0 + if pred(p, callIndex0) { + p0 = p + } + } + return p0 } |
