pkg

package
v0.0.0-...-15c5957 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyLockSet

func CopyLockSet(lockSet map[string]bool) map[string]bool

func ReportPotentialDataRace

func ReportPotentialDataRace(varAccessInfo, sharedVarAccess *VarAccessInfo)

Types

type GoRoutineCreator

type GoRoutineCreator struct {
	PkgID   string
	FuncID  string
	BlockID int
	Pos     int
}

type Linter

type Linter struct {
	SharedVarAccessMap map[string][]*VarAccessInfo
	GlobalVarMap       map[string]string

	GoRoutineMap        map[string]bool
	GoRoutineCreatorMap map[string]*GoRoutineCreator

	SSAFuncMap map[*ssa.Function]bool

	FilePath string
}

func NewLinter

func NewLinter(filePath string) (*Linter, error)

func (*Linter) Analysis

func (l *Linter) Analysis()

func (*Linter) HasVarDataRace

func (l *Linter) HasVarDataRace(varAccessInfo, sharedVarAccessInfo *VarAccessInfo) bool

func (*Linter) IsGoRoutine

func (l *Linter) IsGoRoutine(fullFuncID string) bool

func (*Linter) ParseGlobalElements

func (l *Linter) ParseGlobalElements() *Linter

func (*Linter) ParseSSAFunctions

func (l *Linter) ParseSSAFunctions() (*Linter, error)

func (*Linter) SearchVarID

func (l *Linter) SearchVarID(varAccessID string) string

type VarAccessInfo

type VarAccessInfo struct {
	PkgID   string
	FuncID  string
	BlockID int
	Pos     int
	ID      string
	Read    bool
	Write   bool
	LockSet map[string]bool
	Instr   ssa.Instruction
}

Jump to

Keyboard shortcuts

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