From f89294761cb8f89e11aecb58ee27629fcfeafbc3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 18 Oct 2017 12:00:16 +0200 Subject: executor: use forkserver for freebsd Use forkserver and shmem for freebsd. This greatly improves speed. Also introduce fallback coverage signal based on unique (syscall+errno) pairs. --- pkg/ipc/ipc.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pkg') diff --git a/pkg/ipc/ipc.go b/pkg/ipc/ipc.go index 8abf54054..a28eedcfa 100644 --- a/pkg/ipc/ipc.go +++ b/pkg/ipc/ipc.go @@ -477,6 +477,20 @@ func (env *Env) readOutCoverage(p *prog.Prog) (info []CallInfo, err0 error) { } info[callIndex].Comps = compMap } + if env.config.Flags&FlagSignal != 0 { + // This is fallback coverage used when no real coverage available. + // We use syscall number or-ed with returned errno value as signal. + // At least this gives us all combinations of syscall+errno. + for i := range info { + ci := &info[i] + if len(ci.Signal) != 0 { + continue + } + num := p.Calls[i].Meta.ID + sig := uint32(num<<16) | uint32(ci.Errno)&0x3ff + ci.Signal = []uint32{sig} + } + } return } -- cgit mrf-deployment