aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2022-04-21 17:09:46 -0700
committerDmitry Vyukov <dvyukov@google.com>2022-04-25 10:03:58 +0200
commitf3819cab601e2cd12383bf4e307988c3e3732dd4 (patch)
treee67e3cf790c52f438a3d2cf97efa743d6cb8a0fe /pkg
parentc889aef90c8deca0fd0d0e65faab5a3c0b4100d0 (diff)
report: report fuzzer fatal errors
Signed-off-by: Andrei Vagin <avagin@google.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/log/log.go4
-rw-r--r--pkg/report/report.go13
-rw-r--r--pkg/report/testdata/all/report/54
3 files changed, 19 insertions, 2 deletions
diff --git a/pkg/log/log.go b/pkg/log/log.go
index b21ced9a6..a3ff96696 100644
--- a/pkg/log/log.go
+++ b/pkg/log/log.go
@@ -94,11 +94,11 @@ func Logf(v int, msg string, args ...interface{}) {
}
func Fatal(err error) {
- golog.Fatal(err)
+ golog.Fatal("SYZFATAL: ", err)
}
func Fatalf(msg string, args ...interface{}) {
- golog.Fatalf(msg, args...)
+ golog.Fatalf("SYZFATAL: "+msg, args...)
}
type VerboseWriter int
diff --git a/pkg/report/report.go b/pkg/report/report.go
index c431236a1..c6bebdfb9 100644
--- a/pkg/report/report.go
+++ b/pkg/report/report.go
@@ -759,6 +759,19 @@ var commonOopses = []*oops{
[]*regexp.Regexp{},
},
{
+ // Errors produced by log.Fatal functions.
+ []byte("SYZFATAL:"),
+ []oopsFormat{
+ {
+ title: compile("SYZFATAL:(.*)()"),
+ alt: []string{"SYZFATAL%[2]s"},
+ fmt: "SYZFATAL:%[1]v",
+ noStackTrace: true,
+ },
+ },
+ []*regexp.Regexp{},
+ },
+ {
[]byte("panic:"),
[]oopsFormat{
{
diff --git a/pkg/report/testdata/all/report/5 b/pkg/report/testdata/all/report/5
new file mode 100644
index 000000000..797dd5456
--- /dev/null
+++ b/pkg/report/testdata/all/report/5
@@ -0,0 +1,4 @@
+TITLE: SYZFATAL: executor NUM failed NUM times: call NUM/NUM/NUM: signal overflow: ADDR/ADDR
+ALT: SYZFATAL
+
+2022/04/21 07:35:27 SYZFATAL: executor 0 failed 11 times: call 15/15/3356: signal overflow: 808464432/16776764