Documentation ¶
Overview ¶
Package report contains functions that process kernel output, detect/extract crash messages, symbolize them, etc.
Index ¶
- func Fuzz(data []byte) int
- func GetLinuxMaintainers(kernelSrc, file string) (vcs.Recipients, error)
- func IsSuppressed(reporter *Reporter, output []byte) bool
- func Truncate(log []byte, begin, end int) []byte
- type DecompiledOpcode
- type DecompilerFlagMask
- type ExecutorInfo
- type Report
- type Reporter
- func (reporter *Reporter) ContainsCrash(output []byte) bool
- func (reporter *Reporter) Parse(output []byte) *Report
- func (reporter *Reporter) ParseFrom(output []byte, minReportPos int) *Report
- func (reporter *Reporter) ReportToGuiltyFile(title string, report []byte) string
- func (reporter *Reporter) Symbolize(rep *Report) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLinuxMaintainers ¶
func GetLinuxMaintainers(kernelSrc, file string) (vcs.Recipients, error)
func IsSuppressed ¶
Types ¶
type DecompiledOpcode ¶
func DecompileOpcodes ¶
func DecompileOpcodes(rawOpcodes []byte, flags DecompilerFlagMask, target *targets.Target) ([]DecompiledOpcode, error)
Decompiles a byte array with opcodes into human-readable descriptions. Target must specify the environment from which the opcodes were taken.
type DecompilerFlagMask ¶
type DecompilerFlagMask uint64
const (
FlagForceArmThumbMode DecompilerFlagMask = 1 << iota
)
Extra flags that control the flow of decompilation.
type ExecutorInfo ¶
type Report ¶
type Report struct { // Title contains a representative description of the first oops. Title string // Alternative titles, used for better deduplication. // If two crashes have a non-empty intersection of Title/AltTitles, they are considered the same bug. AltTitles []string // Bug type (e.g. hang, memory leak, etc). Type crash.Type // The indicative function name. Frame string // Report contains whole oops text. Report []byte // Output contains whole raw console output as passed to Reporter.Parse. Output []byte // StartPos/EndPos denote region of output with oops message(s). StartPos int EndPos int // SkipPos is position in output where parsing for the next report should start. SkipPos int // Suppressed indicates whether the report should not be reported to user. Suppressed bool // Corrupted indicates whether the report is truncated of corrupted in some other way. Corrupted bool // CorruptedReason contains reason why the report is marked as corrupted. CorruptedReason string // Recipients is a list of RecipientInfo with Email, Display Name, and type. Recipients vcs.Recipients // GuiltyFile is the source file that we think is to blame for the crash (filled in by Symbolize). GuiltyFile string // Arbitrary information about the test VM, may be attached to the report by users of the package. MachineInfo []byte // If the crash happened in the context of the syz-executor process, Executor will hold more info. Executor *ExecutorInfo // contains filtered or unexported fields }
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
func NewReporter ¶
NewReporter creates reporter for the specified OS/Type.
func (*Reporter) ContainsCrash ¶
func (*Reporter) ReportToGuiltyFile ¶
There are cases when we need to extract a guilty file, but have no ability to do it the proper way -- parse and symbolize the raw console output log. One of such cases is the syz-fillreports tool, which only has access to the already symbolized logs. ReportToGuiltyFile does its best to extract the data.