aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/report/linux.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-05-20 18:30:54 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-05-20 19:40:20 +0200
commit4d4a4420e72dba0231c8ce5921eb75dddab88747 (patch)
tree34f2ae02ce4ce3db0ac7aa3d86ac159866834b1f /pkg/report/linux.go
parentcddddce85a40e86cef84d52e851e0c7a16ead437 (diff)
pkg/report: add Type/Frame to Report
In several places we do special handling for some crash types. Currently we compare report title with magic strings, which is error-prone. Add explicit Type to reports.
Diffstat (limited to 'pkg/report/linux.go')
-rw-r--r--pkg/report/linux.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go
index d414395cb..3b1e96581 100644
--- a/pkg/report/linux.go
+++ b/pkg/report/linux.go
@@ -791,8 +791,6 @@ var linuxStackParams = &stackParams{
},
}
-const MemoryLeakPrefix = "memory leak in "
-
func warningStackFmt(skip ...string) *stackFmt {
return &stackFmt{
// In newer kernels WARNING traps and actual stack starts after invalid_op frame,
@@ -996,7 +994,7 @@ var linuxOopses = []*oops{
},
{
title: compile("BUG: memory leak"),
- fmt: MemoryLeakPrefix + "%[1]v",
+ fmt: memoryLeakPrefix + "%[1]v",
stack: &stackFmt{
parts: []*regexp.Regexp{
compile("backtrace:"),
@@ -1484,7 +1482,7 @@ var linuxOopses = []*oops{
[]oopsFormat{
{
title: compile("Booting the kernel."),
- fmt: UnexpectedKernelReboot,
+ fmt: unexpectedKernelReboot,
noStackTrace: true,
},
},