mirror of
https://github.com/reactos/syzkaller.git
synced 2025-02-17 01:58:02 +00:00
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
This commit is contained in:
parent
d75f7686f1
commit
c69659e352
@ -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"),
|
||||
|
12
pkg/report/testdata/openbsd/report/6
vendored
12
pkg/report/testdata/openbsd/report/6
vendored
@ -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
|
||||
|
@ -43,6 +43,7 @@ EOF
|
||||
|
||||
cat >etc/sysctl.conf <<EOF
|
||||
ddb.max_line=0
|
||||
ddb.max_width=0
|
||||
hw.smt=1
|
||||
EOF
|
||||
|
||||
|
@ -15,7 +15,8 @@ import (
|
||||
func DiagnoseOpenBSD(w io.Writer) bool {
|
||||
commands := []string{
|
||||
"",
|
||||
"set $lines = 0", // disable pagination
|
||||
"set $lines = 0", // disable pagination
|
||||
"set $maxwidth = 0", // disable line continuation
|
||||
"show panic",
|
||||
"trace",
|
||||
"show registers",
|
||||
|
Loading…
x
Reference in New Issue
Block a user