diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2016-03-02 11:24:45 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2016-03-10 17:47:13 +0100 |
| commit | 9851bc6a97a1bed0a5ff45aae727bfe6760f5b93 (patch) | |
| tree | a67b72991971658a00a959ee8c2f545c0852e38c /tools | |
| parent | 094d49fe0c7597c2a679c8e0d57f77215fa6a1e3 (diff) | |
fuzzer: improve kmemleak logic
Kmemleak has false positives. To mitigate most of them, it checksums
potentially leaked objects, and reports them only on the next scan
iff the checksum does not change. Because of that we do the following
intricate dance:
Scan, sleep, scan again. At this point we can get some leaks.
If there are leaks, we sleep and scan again, this can remove
false leaks. Then, read kmemleak again. If we get leaks now, then
hopefully these are true positives during the previous testing cycle.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/syz-stress/stress.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/syz-stress/stress.go b/tools/syz-stress/stress.go index 2edb02c81..10a2785b3 100644 --- a/tools/syz-stress/stress.go +++ b/tools/syz-stress/stress.go @@ -48,7 +48,7 @@ func main() { ct := prog.BuildChoiceTable(prios, calls) flags, timeout := ipc.DefaultFlags() - gate = ipc.NewGate(2 * *flagProcs) + gate = ipc.NewGate(2**flagProcs, nil) for pid := 0; pid < *flagProcs; pid++ { pid := pid go func() { @@ -89,7 +89,7 @@ func execute(pid int, env *ipc.Env, p *prog.Prog) { atomic.AddUint64(&statExec, 1) if *flagLogProg { ticket := gate.Enter() - defer gate.Leave(ticket, nil) + defer gate.Leave(ticket) outMu.Lock() fmt.Printf("executing program %v\n%s\n", pid, p.Serialize()) outMu.Unlock() |
