diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-03-06 10:00:04 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-03-06 19:15:44 +0100 |
| commit | c9af7e5fda6a40ea71bae7a5a3fb04f2427fe822 (patch) | |
| tree | 34a946492f9c1732b93baf2d4326f4fe3da3ac28 /pkg/report/linux.go | |
| parent | b5fcd0c55410c4962006015b975821507467564a (diff) | |
pkg/report: improve KASAN report parsing
The problem is with "BUG: KASAN: (.*)" match which matches
just anything however much it is corrupted.
Mark this match as corrupted.
Diffstat (limited to 'pkg/report/linux.go')
| -rw-r--r-- | pkg/report/linux.go | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go index 7b9238904..69284b846 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -594,8 +594,10 @@ var linuxOopses = []*oops{ []byte("BUG:"), []oopsFormat{ { - title: compile("BUG: KASAN: ([a-z\\-]+) in {{FUNC}}(?:.*\\n)+?.*(Read|Write) of size (?:[0-9]+)"), - fmt: "KASAN: %[1]v %[3]v in %[4]v", + title: compile("BUG: KASAN:"), + report: compile("BUG: KASAN: ([a-z\\-]+) in {{FUNC}}(?:.*\\n)+?.*(Read|Write) of size (?:[0-9]+)"), + + fmt: "KASAN: %[1]v %[3]v in %[4]v", stack: &stackFmt{ parts: []*regexp.Regexp{ compile("BUG: KASAN: (?:[a-z\\-]+) in {{FUNC}}"), @@ -605,17 +607,25 @@ var linuxOopses = []*oops{ }, }, { - title: compile("BUG: KASAN: ([a-z\\-]+) in {{FUNC}}(?:.*\\n)+?.*(Read|Write) of size (?:[0-9]+)"), - fmt: "KASAN: %[1]v %[3]v in %[2]v", - corrupted: true, + title: compile("BUG: KASAN:"), + report: compile("BUG: KASAN: double-free or invalid-free in {{FUNC}}"), + fmt: "KASAN: invalid-free in %[2]v", + stack: &stackFmt{ + parts: []*regexp.Regexp{ + compile("BUG: KASAN: double-free or invalid-free in {{FUNC}}"), + compile("Call Trace:"), + parseStackTrace, + }, + }, }, { title: compile("BUG: KASAN: ([a-z\\-]+) on address(?:.*\\n)+?.*(Read|Write) of size ([0-9]+)"), fmt: "KASAN: %[1]v %[2]v", }, { - title: compile("BUG: KASAN: (.*)"), - fmt: "KASAN: %[1]v", + title: compile("BUG: KASAN: (.*)"), + fmt: "KASAN: %[1]v", + corrupted: true, }, { title: compile("BUG: unable to handle kernel paging request"), |
