report

package
v0.0.0-...-af24b05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 17 Imported by: 157

Documentation

Overview

Package report contains functions that process kernel output, detect/extract crash messages, symbolize them, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fuzz

func Fuzz(data []byte) int

func GetLinuxMaintainers

func GetLinuxMaintainers(kernelSrc, file string) (vcs.Recipients, error)

func IsSuppressed

func IsSuppressed(reporter *Reporter, output []byte) bool

func Truncate

func Truncate(log []byte, begin, end int) []byte

Truncate leaves up to `begin` bytes at the beginning of log and up to `end` bytes at the end of the log.

Types

type DecompiledOpcode

type DecompiledOpcode struct {
	Offset          int
	IsBad           bool
	Instruction     string
	FullDescription string
}

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 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
	// contains filtered or unexported fields
}

func ParseAll

func ParseAll(reporter *Reporter, output []byte) (reports []*Report)

ParseAll returns all successive reports in output.

func (Report) String

func (r Report) String() string

type Reporter

type Reporter struct {
	// contains filtered or unexported fields
}

func NewReporter

func NewReporter(cfg *mgrconfig.Config) (*Reporter, error)

NewReporter creates reporter for the specified OS/Type.

func (*Reporter) ContainsCrash

func (reporter *Reporter) ContainsCrash(output []byte) bool

func (*Reporter) Parse

func (reporter *Reporter) Parse(output []byte) *Report

func (*Reporter) ParseFrom

func (reporter *Reporter) ParseFrom(output []byte, minReportPos int) *Report

func (*Reporter) ReportToGuiltyFile

func (reporter *Reporter) ReportToGuiltyFile(title string, report []byte) string

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.

func (*Reporter) Symbolize

func (reporter *Reporter) Symbolize(rep *Report) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL