diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-10-18 12:00:16 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-10-18 12:01:24 +0200 |
| commit | f89294761cb8f89e11aecb58ee27629fcfeafbc3 (patch) | |
| tree | f27f681077bdb126aea433d866bce03b72f86cd5 /pkg | |
| parent | 6368c469a5868b3e1d40ba95a44561f895698bcc (diff) | |
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.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/ipc/ipc.go | 14 |
1 files changed, 14 insertions, 0 deletions
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 } |
