From f3819cab601e2cd12383bf4e307988c3e3732dd4 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Thu, 21 Apr 2022 17:09:46 -0700 Subject: report: report fuzzer fatal errors Signed-off-by: Andrei Vagin --- pkg/log/log.go | 4 ++-- pkg/report/report.go | 13 +++++++++++++ pkg/report/testdata/all/report/5 | 4 ++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 pkg/report/testdata/all/report/5 (limited to 'pkg') 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 @@ -758,6 +758,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 -- cgit mrf-deployment