diff --git a/pkg/report/linux.go b/pkg/report/linux.go index bccd615c..4fbf5ddc 100644 --- a/pkg/report/linux.go +++ b/pkg/report/linux.go @@ -133,10 +133,12 @@ func (ctx *linux) Parse(output []byte) *Report { } continue } + rep.EndPos = next if oops == nil { oops = oops1 rep.StartPos = pos rep.Title = string(output[pos+match : next]) + break } else if secondReportPos == 0 { ignored := false for _, ignore := range ctx.reportStartIgnores { @@ -149,7 +151,6 @@ func (ctx *linux) Parse(output []byte) *Report { secondReportPos = pos } } - rep.EndPos = next } if oops == nil { logReportPrefix = append(logReportPrefix, append([]byte{}, line...)) @@ -221,7 +222,10 @@ func (ctx *linux) Parse(output []byte) *Report { reportPrefix = logReportPrefix title, corrupted, format = extractDescription(report, oops, linuxStackParams) if title == "" { - panic(fmt.Sprintf("non matching oops for %q in:\n%s", oops.header, report)) + panic(fmt.Sprintf("non matching oops for %q in:\n%s\n\nconsole:\n%s\n"+ + "output [range:%v-%v]:\n%s\n", + oops.header, report, consoleReport[:firstReportEnd], + rep.StartPos, secondReportPos, output)) } } rep.Title = title diff --git a/pkg/report/testdata/linux/report/217 b/pkg/report/testdata/linux/report/217 new file mode 100644 index 00000000..7c850d52 --- /dev/null +++ b/pkg/report/testdata/linux/report/217 @@ -0,0 +1,9 @@ +TITLE: BUG: unable to handle kernel paging request in foo_ioctl +CORRUPTED: Y + +foo + +[ 76.470085] syz-executor7: vmalloc: allocation failure: 34359738352 bytes[ 76.471107] BUG: unable to handle kernel paging request at ffffffffa4493138 +[ 76.471114] IP: [] foo_ioctl+0x129b/0x2280 + +