diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-07-02 17:00:00 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-07-02 17:00:00 +0200 |
| commit | 58924941cce8ea5d7be1d29a313e14e1c506c5db (patch) | |
| tree | 1a553100870ed1a113e9e0bda33dd06c1d23e020 /pkg | |
| parent | 574780b002d00a4af293b05dfa16c5d64992670b (diff) | |
pkg/report: fix race on symbolizer in test
Symbolizer is not meant to be invoked with an empty binary.
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/report/fuchsia.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/report/fuchsia.go b/pkg/report/fuchsia.go index 419f0dd07..8e8b1a7b2 100644 --- a/pkg/report/fuchsia.go +++ b/pkg/report/fuchsia.go @@ -46,9 +46,11 @@ var ( func ctorFuchsia(kernelSrc, kernelObj string, ignores []*regexp.Regexp) (Reporter, []string, error) { ctx := &fuchsia{ - obj: filepath.Join(kernelObj, "zircon.elf"), ignores: ignores, } + if kernelObj != "" { + ctx.obj = filepath.Join(kernelObj, "zircon.elf") + } suppressions := []string{ "fatal exception: process /tmp/syz-fuzzer", // OOM presumably } @@ -114,6 +116,9 @@ func (ctx *fuchsia) Parse(output []byte) *Report { func (ctx *fuchsia) processPC(rep *Report, symb *symbolizer.Symbolizer, line []byte, match []int, call bool, where *string) bool { + if ctx.obj == "" { + return false + } prefix := line[match[0]:match[1]] pcStart := match[2] - match[0] pcEnd := match[3] - match[0] |
