aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/report/linux.go
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2017-12-11 15:06:58 +0100
committerAndrey Konovalov <andreyknvl@gmail.com>2017-12-11 16:01:10 +0100
commit02b8de13ac3b47734b3ee784867aa753865e5397 (patch)
treefa099bc3c4d375033a40c8d35fe58ee57f921ab7 /pkg/report/linux.go
parent27f5dfefff3cd00795d9048ecc7bc70965e03ea7 (diff)
pkg/report: better detect corrupted stack traces
We may find stack frames from the second stack trace in a report when searching from frames of the first one.
Diffstat (limited to 'pkg/report/linux.go')
-rw-r--r--pkg/report/linux.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go
index 17b99aa0e..b862bf54e 100644
--- a/pkg/report/linux.go
+++ b/pkg/report/linux.go
@@ -398,7 +398,14 @@ func (ctx *linux) isCorrupted(title string, report []byte, format oopsFormat) bo
frames = frames[1:]
corrupted := true
// Check that at least one of the next 10 lines contains a frame.
+ outer:
for i := 0; i < 10 && i < len(frames); i++ {
+ for _, key1 := range linuxStackKeywords {
+ // Next stack trace starts.
+ if key1.Match(frames[i]) {
+ break outer
+ }
+ }
if bytes.Contains(frames[i], []byte("(stack is not available)")) || stackFrameRe.Match(frames[i]) {
corrupted = false
break