diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-12-30 18:30:59 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-12-30 18:52:59 +0100 |
| commit | 5cc121d679e3f161f29503eeba9288431b6d644d (patch) | |
| tree | f30ae7eb3710e9f8c1632054dea72bf3ef322693 /pkg/report/linux.go | |
| parent | 33e6450b35b8dc1e537e3c5b9a26cdafba6f08bb (diff) | |
pkg/report: improve arm oops parsing
Diffstat (limited to 'pkg/report/linux.go')
| -rw-r--r-- | pkg/report/linux.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pkg/report/linux.go b/pkg/report/linux.go index 50100cf72..05929a293 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -531,18 +531,22 @@ func (ctx *linux) isCorrupted(title string, report []byte, format oopsFormat) (b if match == nil { continue } - hasStackTrace = true frames := bytes.Split(report[match[0]:], []byte{'\n'}) if len(frames) < 4 { return true, "call trace is missed" } numLines := 15 + corrupted := true if bytes.Contains(frames[0], []byte("Stack:")) { // Arm stacks contain 22 lines of memory dump before actual frames (see report 241). numLines += 22 + // More arm quirks: there are reports where "Stack:" denotes beginning of a stack, + // so we need to check them, but there are also reports where "Stack:" section is empty + // and it's immediately followed by "Backtrace:" which contains the real stack, + // so we can't mark the report as corrupted if "Stack:" is empty. + corrupted = false } frames = frames[1:] - corrupted := true // Check that at least one of the next few lines contains a frame. outer: for i := 0; i < numLines && i < len(frames); i++ { @@ -554,6 +558,7 @@ func (ctx *linux) isCorrupted(title string, report []byte, format oopsFormat) (b } if bytes.Contains(frames[i], []byte("(stack is not available)")) || matchesAny(frames[i], linuxStackParams.frameRes) { + hasStackTrace = true corrupted = false break } |
