Skip to content

Commit 5bf2d4f

Browse files
committed
pkg/report: factor out type definitions
Side fix - prefix the rust reports.
1 parent d6cdfb8 commit 5bf2d4f

File tree

13 files changed

+248
-184
lines changed

13 files changed

+248
-184
lines changed

pkg/report/darwin.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ package report
55

66
import (
77
"regexp"
8-
9-
"github.com/google/syzkaller/pkg/report/crash"
108
)
119

1210
func ctorDarwin(cfg *config) (reporterImpl, []string, error) {
@@ -45,7 +43,6 @@ var darwinOopses = append([]*oops{
4543
},
4644
},
4745
[]*regexp.Regexp{},
48-
crash.UnknownType,
4946
},
5047
{
5148
[]byte("Debugger: Unexpected kernel trap number:"),
@@ -56,7 +53,6 @@ var darwinOopses = append([]*oops{
5653
},
5754
},
5855
[]*regexp.Regexp{},
59-
crash.UnknownType,
6056
},
6157
&groupGoRuntimeErrors,
6258
}, commonOopses...)

pkg/report/freebsd.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ package report
55

66
import (
77
"regexp"
8-
9-
"github.com/google/syzkaller/pkg/report/crash"
108
)
119

1210
type freebsd struct {
@@ -57,7 +55,6 @@ var freebsdOopses = append([]*oops{
5755
},
5856
},
5957
[]*regexp.Regexp{},
60-
crash.UnknownType,
6158
},
6259
{
6360
[]byte("panic:"),
@@ -105,7 +102,6 @@ var freebsdOopses = append([]*oops{
105102
},
106103
},
107104
[]*regexp.Regexp{},
108-
crash.UnknownType,
109105
},
110106
&groupGoRuntimeErrors,
111107
}, commonOopses...)

pkg/report/fuchsia.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"strconv"
1212
"strings"
1313

14-
"github.com/google/syzkaller/pkg/report/crash"
1514
"github.com/google/syzkaller/pkg/symbolizer"
1615
"github.com/ianlancetaylor/demangle"
1716
)
@@ -324,7 +323,6 @@ var zirconOopses = []*oops{
324323
},
325324
},
326325
[]*regexp.Regexp{},
327-
crash.UnknownType,
328326
},
329327
{
330328
[]byte("recursion in interrupt handler"),
@@ -345,7 +343,6 @@ var zirconOopses = []*oops{
345343
},
346344
},
347345
[]*regexp.Regexp{},
348-
crash.UnknownType,
349346
},
350347
// We should detect just "stopping other cpus" as some kernel crash rather then as "lost connection",
351348
// but if we add oops for "stopping other cpus", then it will interfere with other formats,
@@ -360,11 +357,9 @@ var zirconOopses = []*oops{
360357
title: compile("welcome to Zircon"),
361358
fmt: "unexpected kernel reboot",
362359
noStackTrace: true,
363-
reportType: crash.UnexpectedReboot,
364360
},
365361
},
366362
[]*regexp.Regexp{},
367-
crash.UnknownType,
368363
},
369364
{
370365
[]byte("KVM internal error"),
@@ -376,7 +371,6 @@ var zirconOopses = []*oops{
376371
},
377372
},
378373
[]*regexp.Regexp{},
379-
crash.UnknownType,
380374
},
381375
{
382376
[]byte("<== fatal exception"),
@@ -391,7 +385,6 @@ var zirconOopses = []*oops{
391385
[]*regexp.Regexp{
392386
compile("<== fatal exception: process .+?syz.+?\\["),
393387
},
394-
crash.UnknownType,
395388
},
396389
}
397390

@@ -412,7 +405,6 @@ var starnixOopses = []*oops{
412405
},
413406
},
414407
[]*regexp.Regexp{},
415-
crash.UnknownType,
416408
},
417409
}
418410

pkg/report/gvisor.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ package report
66
import (
77
"bytes"
88
"regexp"
9-
10-
"github.com/google/syzkaller/pkg/report/crash"
119
)
1210

1311
type gvisor struct {
@@ -106,7 +104,6 @@ var gvisorOopses = append([]*oops{
106104
},
107105
},
108106
[]*regexp.Regexp{},
109-
crash.UnknownType,
110107
},
111108
{
112109
[]byte("SIGSEGV:"),
@@ -118,7 +115,6 @@ var gvisorOopses = append([]*oops{
118115
},
119116
},
120117
[]*regexp.Regexp{},
121-
crash.UnknownType,
122118
},
123119
{
124120
[]byte("SIGBUS:"),
@@ -130,7 +126,6 @@ var gvisorOopses = append([]*oops{
130126
},
131127
},
132128
[]*regexp.Regexp{},
133-
crash.UnknownType,
134129
},
135130
{
136131
[]byte("FATAL ERROR:"),
@@ -142,7 +137,6 @@ var gvisorOopses = append([]*oops{
142137
},
143138
},
144139
[]*regexp.Regexp{},
145-
crash.UnknownType,
146140
},
147141
{
148142
[]byte("WARNING: DATA RACE"),
@@ -155,7 +149,6 @@ var gvisorOopses = append([]*oops{
155149
},
156150
},
157151
[]*regexp.Regexp{},
158-
crash.UnknownType,
159152
},
160153
{
161154
[]byte("Invalid request partialResult"),
@@ -168,7 +161,6 @@ var gvisorOopses = append([]*oops{
168161
},
169162
},
170163
[]*regexp.Regexp{},
171-
crash.UnknownType,
172164
},
173165
{
174166
[]byte("fatal error:"),
@@ -180,6 +172,5 @@ var gvisorOopses = append([]*oops{
180172
},
181173
},
182174
[]*regexp.Regexp{},
183-
crash.UnknownType,
184175
},
185176
}, commonOopses...)

0 commit comments

Comments
 (0)