From 9851bc6a97a1bed0a5ff45aae727bfe6760f5b93 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 2 Mar 2016 11:24:45 +0100 Subject: 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. --- tools/syz-stress/stress.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') 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() -- cgit mrf-deployment