pass

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataKeyRequiredOrtImport = "RequiredOrtImport"
)

Variables

This section is empty.

Functions

func NewArgCall

func NewArgCall(strPkg, strCallee string, vecExprArg []ast.Expr) *ast.CallExpr

func NewArgCallExpr

func NewArgCallExpr(strPkg, strCallee string, vecExprArg []ast.Expr) *ast.ExprStmt

func SelectorCallerHasTypes

func SelectorCallerHasTypes(iCtx *inst.InstContext, selExpr *ast.SelectorExpr, trueIfUnknown bool, tys ...string) bool

Types

type ChLifeCyclePass

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

ChLifeCyclePass tries to mark channel's end

func NewChLifeCyclePass

func NewChLifeCyclePass() *ChLifeCyclePass

func (*ChLifeCyclePass) After

func (p *ChLifeCyclePass) After(iCtx *inst.InstContext)

func (*ChLifeCyclePass) Before

func (p *ChLifeCyclePass) Before(iCtx *inst.InstContext)

func (*ChLifeCyclePass) Deps

func (p *ChLifeCyclePass) Deps() []string

func (*ChLifeCyclePass) GetPostApply

func (p *ChLifeCyclePass) GetPostApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*ChLifeCyclePass) GetPreApply

func (p *ChLifeCyclePass) GetPreApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

type ChRecPass

type ChRecPass struct {
}

ChResPass, Channel Record Pass. This pass instrumented at following four channel related operations: send, recv, make, close

func (*ChRecPass) After

func (p *ChRecPass) After(iCtx *inst.InstContext)

func (*ChRecPass) Before

func (p *ChRecPass) Before(iCtx *inst.InstContext)

func (*ChRecPass) Deps

func (p *ChRecPass) Deps() []string

func (*ChRecPass) GetPostApply

func (p *ChRecPass) GetPostApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*ChRecPass) GetPreApply

func (p *ChRecPass) GetPreApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*ChRecPass) Name

func (p *ChRecPass) Name() string

type CvRecPass

type CvRecPass struct{}

CvResPass, Conditional Variable Pass.

func (*CvRecPass) After

func (p *CvRecPass) After(iCtx *inst.InstContext)

func (*CvRecPass) Before

func (p *CvRecPass) Before(iCtx *inst.InstContext)

func (*CvRecPass) Deps

func (p *CvRecPass) Deps() []string

func (*CvRecPass) GetPostApply

func (p *CvRecPass) GetPostApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*CvRecPass) GetPreApply

func (p *CvRecPass) GetPreApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

type MtxRecPass

type MtxRecPass struct{}

MtxResPass, Mutex (and RWMutex) Record Pass.

func (*MtxRecPass) After

func (p *MtxRecPass) After(iCtx *inst.InstContext)

func (*MtxRecPass) Before

func (p *MtxRecPass) Before(iCtx *inst.InstContext)

func (*MtxRecPass) Deps

func (p *MtxRecPass) Deps() []string

func (*MtxRecPass) GetPostApply

func (p *MtxRecPass) GetPostApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*MtxRecPass) GetPreApply

func (p *MtxRecPass) GetPreApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

type OraclePass

type OraclePass struct{}

OraclePass, instrument the oracle entry and defer function call to trigger oracle bug detection

func (*OraclePass) After

func (p *OraclePass) After(iCtx *inst.InstContext)

func (*OraclePass) Before

func (p *OraclePass) Before(iCtx *inst.InstContext)

func (*OraclePass) Deps

func (p *OraclePass) Deps() []string

func (*OraclePass) GetPostApply

func (p *OraclePass) GetPostApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*OraclePass) GetPreApply

func (p *OraclePass) GetPreApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

type RecvAndFirstStmt

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

type SelEfcmPass

type SelEfcmPass struct{}

SelEfcm, select enforcement pass, instrument the 'select' keyword, turn it into a select with multiple cases, each case represent one original select's case and a timeout case.

func (*SelEfcmPass) After

func (p *SelEfcmPass) After(iCtx *inst.InstContext)

func (*SelEfcmPass) Before

func (p *SelEfcmPass) Before(iCtx *inst.InstContext)

func (*SelEfcmPass) Deps

func (p *SelEfcmPass) Deps() []string

func (*SelEfcmPass) GetPostApply

func (p *SelEfcmPass) GetPostApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*SelEfcmPass) GetPreApply

func (p *SelEfcmPass) GetPreApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*SelEfcmPass) Name

func (p *SelEfcmPass) Name() string

type SelectStruct

type SelectStruct struct {
	StmtSelect    *ast.SelectStmt   // StmtSelect.Body.List is a vec of CommClause
	VecCommClause []*ast.CommClause // a CommClause is a case and its content in select
	VecOp         []ast.Stmt        // The operations of cases. Nil is default
	VecBody       [][]ast.Stmt      // The content of cases
}

type SwitchStruct

type SwitchStruct struct {
	StmtSwitch    *ast.SwitchStmt // StmtSwitch.Body.List is a vector of CaseClause
	Tag           ast.Expr
	VecCaseClause []*ast.CaseClause // a CaseClause is a case and its content in switch.
	VecVecExpr    [][]ast.Expr      // The expressions of each case.
	VecBody       [][]ast.Stmt      // The content of cases
}

type WgRecPass

type WgRecPass struct{}

WgResPass, Wait Group Record Pass.

func (*WgRecPass) After

func (p *WgRecPass) After(iCtx *inst.InstContext)

func (*WgRecPass) Before

func (p *WgRecPass) Before(iCtx *inst.InstContext)

func (*WgRecPass) Deps

func (p *WgRecPass) Deps() []string

func (*WgRecPass) GetPostApply

func (p *WgRecPass) GetPostApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*WgRecPass) GetPreApply

func (p *WgRecPass) GetPreApply(iCtx *inst.InstContext) func(*astutil.Cursor) bool

func (*WgRecPass) Name

func (p *WgRecPass) Name() string

Jump to

Keyboard shortcuts

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