aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorAnton Lindqvist <anton@basename.se>2019-02-09 17:23:53 +0100
committerGreg Steuck <blackgnezdo@gmail.com>2019-02-09 08:23:53 -0800
commitc69659e3523cba959b06e05d4a5e44e52c31ddd2 (patch)
tree3dc24d643fbb2388bdf23cb7b4c3b60acfa4980e /pkg
parentd75f7686f1970e09ce7bafc57f8099651099b3a9 (diff)
openbsd: remove shorten report logic (#986)
A line length of 79 in the ddb output does not necessarily imply that the following line is a continuation of the current line. Since there's no way to distinguish between ordinary and continuation lines, it could end up corrupting the report by joining two lines that are disjoint[1]. Instead, disable line wrapping in ddb. If we want some kind of wrapping in the future it's easier done by pkg/report. [1] https://syzkaller.appspot.com/bug?extid=03f7377a9848d7d008c9
Diffstat (limited to 'pkg')
-rw-r--r--pkg/report/openbsd.go16
-rw-r--r--pkg/report/testdata/openbsd/report/612
2 files changed, 4 insertions, 24 deletions
diff --git a/pkg/report/openbsd.go b/pkg/report/openbsd.go
index 2065eaf03..051e41c0b 100644
--- a/pkg/report/openbsd.go
+++ b/pkg/report/openbsd.go
@@ -70,9 +70,6 @@ func (ctx *openbsd) Parse(output []byte) *Report {
return nil
}
rep.Output = output
- if report := ctx.shortenReport(rep.Report); len(report) != 0 {
- rep.Report = report
- }
return rep
}
@@ -142,19 +139,6 @@ func (ctx *openbsd) symbolizeLine(symbFunc func(bin string, pc uint64) ([]symbol
return symbolized
}
-func (ctx *openbsd) shortenReport(report []byte) []byte {
- out := new(bytes.Buffer)
- for s := bufio.NewScanner(bytes.NewReader(report)); s.Scan(); {
- line := s.Bytes()
- out.Write(line)
- // Kernel splits lines at 79 column.
- if len(line) != 79 {
- out.WriteByte('\n')
- }
- }
- return out.Bytes()
-}
-
var openbsdOopses = []*oops{
{
[]byte("cleaned vnode"),
diff --git a/pkg/report/testdata/openbsd/report/6 b/pkg/report/testdata/openbsd/report/6
index b9ec04b39..7d7696567 100644
--- a/pkg/report/testdata/openbsd/report/6
+++ b/pkg/report/testdata/openbsd/report/6
@@ -7,10 +7,8 @@ TITLE: pool: double put: lockfpl
panic() at panic+0x147
pool_do_put(ffffff001692bd18,ffffffff81ec0850) at pool_do_put+0x2e2
pool_put(ffffff0016933440,ffff80000e3793e8) at pool_put+0x37
- lf_advlock(40,ffffff001dc251c8,2,ffff80000e3793e8,ffffffff81df26c0,200000040) a
- t lf_advlock+0x270
- VOP_ADVLOCK(ffffff0015a96da8,ffff80000e2a3080,3,ffffff001f7ca350,3) at VOP_ADVL
- OCK+0x67
+ lf_advlock(40,ffffff001dc251c8,2,ffff80000e3793e8,ffffffff81df26c0,200000040) at lf_advlock+0x270
+ VOP_ADVLOCK(ffffff0015a96da8,ffff80000e2a3080,3,ffffff001f7ca350,3) at VOP_ADVLOCK+0x67
closef(ffff80000e2a3080,ffffff001f7ca350) at closef+0xaf
fdfree(ffff80000e27c008) at fdfree+0x98
exit1(ffff80000e3795c0,ffff80000e2a3080,ffff80000e27c008) at exit1+0x226
@@ -26,10 +24,8 @@ TITLE: pool: double put: lockfpl
panic() at panic+0x147
pool_do_put(ffffff001692bd18,ffffffff81ec0850) at pool_do_put+0x2e2
pool_put(ffffff0016933440,ffff80000e3793e8) at pool_put+0x37
- lf_advlock(40,ffffff001dc251c8,2,ffff80000e3793e8,ffffffff81df26c0,200000040) a
- t lf_advlock+0x270
- VOP_ADVLOCK(ffffff0015a96da8,ffff80000e2a3080,3,ffffff001f7ca350,3) at VOP_ADVL
- OCK+0x67
+ lf_advlock(40,ffffff001dc251c8,2,ffff80000e3793e8,ffffffff81df26c0,200000040) at lf_advlock+0x270
+ VOP_ADVLOCK(ffffff0015a96da8,ffff80000e2a3080,3,ffffff001f7ca350,3) at VOP_ADVLOCK+0x67
closef(ffff80000e2a3080,ffffff001f7ca350) at closef+0xaf
fdfree(ffff80000e27c008) at fdfree+0x98
exit1(ffff80000e3795c0,ffff80000e2a3080,ffff80000e27c008) at exit1+0x226