diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2023-02-22 07:53:26 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2023-02-22 11:30:20 +0100 |
| commit | 409945bc8fab54efa11597029f5c9704bf0cbc22 (patch) | |
| tree | 68fb9518ea4717056cd54c5afab3673645b8d2bf /pkg/report/testdata | |
| parent | 42a4d50890beed97e5e9868be922faa6285f4a12 (diff) | |
pkg/report: improve Go throw/panic parsing
This several small improvements:
1. Move these patterns into the common part.
We run Go code on (almost) all OSes and error messages
are the same for all of them.
2. Detect "fatal error:" as a bug as well.
This is what I currently see from Go 1.20 runtime,
but we don't recognize it, so these reports probably
go into "lost connection" bucket now (bad).
3. Add a pattern for panic(ENOMEM) message.
pkg/image/compression_optimized.go can produce it
on mmap failure.
4. Add tests.
Diffstat (limited to 'pkg/report/testdata')
| -rw-r--r-- | pkg/report/testdata/all/report/6 | 10 | ||||
| -rw-r--r-- | pkg/report/testdata/all/report/7 | 15 |
2 files changed, 25 insertions, 0 deletions
diff --git a/pkg/report/testdata/all/report/6 b/pkg/report/testdata/all/report/6 new file mode 100644 index 000000000..f6dd5efb7 --- /dev/null +++ b/pkg/report/testdata/all/report/6 @@ -0,0 +1,10 @@ +TITLE: panic: cannot allocate memory +SUPPRESSED: Y + +panic: cannot allocate memory + +goroutine 14 [running]: +github.com/google/syzkaller/pkg/image.mustDecompress({0xc005ab4c00, 0x583, 0x600}) +syzkaller/pkg/image/compression_optimized.go:65 +0x5cb +github.com/google/syzkaller/pkg/image.MustDecompress({0xc005ab4c00, 0xc00746d400, 0x0}) +syzkaller/pkg/image/compression.go:36 +0x3b diff --git a/pkg/report/testdata/all/report/7 b/pkg/report/testdata/all/report/7 new file mode 100644 index 000000000..69be284d9 --- /dev/null +++ b/pkg/report/testdata/all/report/7 @@ -0,0 +1,15 @@ +TITLE: fatal error: out of memory +SUPPRESSED: Y + +runtime: out of memory: cannot allocate 1073741824-byte block (6446022656 in use) +fatal error: out of memory + +goroutine 1 [running]: +runtime.throw({0x4772bc?, 0x20000?}) + runtime/panic.go:1047 +0x5d fp=0xc000184e38 sp=0xc000184e08 pc=0x42ea1d +runtime.(*mcache).allocLarge(0xc0000b0a00?, 0x40000000, 0x1) + runtime/mcache.go:236 +0x178 fp=0xc000184e80 sp=0xc000184e38 pc=0x411318 +runtime.mallocgc(0x40000000, 0x46a9c0, 0x1) + runtime/malloc.go:1053 +0x4f7 fp=0xc000184ee8 sp=0xc000184e80 pc=0x40b157 + + |
