config

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: 9 Imported by: 42

Documentation

Index

Constants

View Source
const ConstPrintDeferMap = "print-defer-map"

flag constants

View Source
const DISABLE_OPTIMIZATION_CALLEES = false // If set to false, we won't enter every callee while building syncgraph
View Source
const MAX_GCATCH_DDL_SECOND = 360000 // 100 h

Dangerous thresholds: these thresholds prevents the checker or part of the checker from timeout

if these thresholds are reached, must print "!!!!" and a warning to the terminal
View Source
const MAX_INST_IN_SYNCGRAPH = 10000
View Source
const MAX_LCA_LAYER = 7 // The maximum caller-callee layers when updating dependency map and finding LCA (Lowest Common Ancester)
View Source
const MAX_PATH_ENUMERATE_SECOND = 60
View Source
const Max_PATH_ENUMERATE int = 1000000000
View Source
const POINTER_CONSIDER_REFLECTION = false
View Source
const Print_Debug_Info = false
View Source
const STRUCT_FP_LAYER int = 3
View Source
const STRUCT_FP_RATIO float32 = 0.5
View Source
const STRUCT_MIN_TIME_OF_USAGE = 4

Parameters used to tune only the checkers/structfield checker

View Source
const STRUCT_RATIO float32 = 0.75

Variables

View Source
var BoolChSafety bool = false
View Source
var BoolDisableFnPointer bool
View Source
var BoolGoMod bool

Variables for beta functionality that allows building and checking only one program using go.mod

View Source
var BugIndex int
View Source
var BugIndexMu sync.Mutex
View Source
var CallGraph *callgraph.Graph
View Source
var Defer2Insts map[*ssa.Defer][]ssa.Instruction
View Source
var Inst2CallSite map[ssa.CallInstruction]map[*callgraph.Edge]bool
View Source
var Inst2Defers map[ssa.Instruction][]*ssa.Defer
View Source
var MapExcludePaths map[string]bool // a map indicates which package names should be ignored
View Source
var MapHashOfCheckedCh map[string]struct{}

Global variables used by BMOC checker

View Source
var MapPrintMod map[string]bool // a map indicates which information will be printed
View Source
var Pkgs []*ssa.Package
View Source
var Prog *ssa.Program
View Source
var StrAbsolutePath string // /home/song/work/go-workspace/code/src/
View Source
var StrEntrancePath string // github.com/etcd-io/etcd
View Source
var StrGOPATH string // /home/song/work/go-workspace/code
View Source
var StrModAbsPath string // Absolute path to the program. go.mod must be in this path
View Source
var StrModulePath string // Module path, like github.com/etcd-io/etcd
View Source
var StrRelativePath string // github.com/etcd-io/etcd
View Source
var VecPathStats []PathStat

Functions

func CountOccurrence

func CountOccurrence(strRootPath string, strQuery string) int

func CountOccurrenceFile

func CountOccurrenceFile(strFileName string, strQuery string) int

func CountOccurrenceRecursive

func CountOccurrenceRecursive(strRootPath string, strQuery string) int

func IsPathIncluded

func IsPathIncluded(strPath string) bool

func LastButOneIndex

func LastButOneIndex(str string, strQuery string) int

func ListAllPkgPaths

func ListAllPkgPaths() []string

Types

type PathStat

type PathStat struct {
	StrPath string
	NumLock int
	NumSend int
}

type PkgPath

type PkgPath struct {
	StrPath         string
	VecChildrenPath []PkgPath //[] string
	NumLock         int
	NumSend         int
}

func ListWorthyPaths

func ListWorthyPaths() (wPaths []PkgPath)

Jump to

Keyboard shortcuts

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