conflictinglock

package
v0.0.0-...-f39ad0c Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2023 License: GPL-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const Edited = "Edited"
View Source
const MaxCallChainDepth int = 6 // Be careful: Algorithm complexity: e^n, n = C5_call_chain_layer
View Source
const MaxInspectedFun int = 100000
View Source
const Unknown = "Unknown"

Variables

View Source
var AnalyzedFNs map[string]bool
View Source
var MapMutex map[string]*StMutex
View Source
var VecFNsWithLocking []*ssa.Function

Functions

func CompareTwoMaps

func CompareTwoMaps(map1 map[*StLockingOp]bool, map2 map[*StLockingOp]bool) bool

func Detect

func Detect()

func GetLiveMutex

func GetLiveMutex(inputInst ssa.Instruction) map[*StLockingOp]bool

func InitBeforeAfterMap

func InitBeforeAfterMap(inputFn *ssa.Function, contextLock map[*StLockingOp]bool)

func InitGenKillMap

func InitGenKillMap(inputFn *ssa.Function)

func Initialize

func Initialize()

func KillKillSet

func KillKillSet(newbefore map[*StLockingOp]bool, pUnlocking *StUnlockingOp)

Types

type StLockPair

type StLockPair struct {
	PLock1      *StLockingOp
	PLock2      *StLockingOp
	CallChainID int
}

func GenKillAnalysis

func GenKillAnalysis(inputFn *ssa.Function, contextLock map[*StLockingOp]bool) []*StLockPair

func MergePairVec

func MergePairVec(v1 []*StLockPair, v2 []*StLockPair) []*StLockPair

func UnionGenSet

func UnionGenSet(newbefore map[*StLockingOp]bool, pLocking *StLockingOp) []*StLockPair

type StLockingOp

type StLockingOp struct {
	StrName  string
	I        ssa.Instruction
	IsRWLock bool
	IsDefer  bool

	Parent *StMutex

	StrFileName string
	NumLine     int
}

type StMutex

type StMutex struct {
	StrName           string
	StrType           string
	StrBastStructType string
	MapLockingOps     map[ssa.Instruction]*StLockingOp
	MapUnlockingOps   map[ssa.Instruction]*StUnlockingOp
	Pkg               string // Don't use *ssa.Package here! It's not reliable

	StrStatus string
}

type StUnlockingOp

type StUnlockingOp struct {
	StrName  string
	I        ssa.Instruction
	IsRWLock bool
	IsDefer  bool

	Parent *StMutex
}

Jump to

Keyboard shortcuts

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