Documentation ¶
Index ¶
- Constants
- Variables
- func CountOccurrence(strRootPath string, strQuery string) int
- func CountOccurrenceFile(strFileName string, strQuery string) int
- func CountOccurrenceRecursive(strRootPath string, strQuery string) int
- func IsPathIncluded(strPath string) bool
- func LastButOneIndex(str string, strQuery string) int
- func ListAllPkgPaths() []string
- type PathStat
- type PkgPath
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 BoolDisableFnPointer bool
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/
var StrGOPATH string // /home/song/work/go-workspace/code
View Source
var StrEntrancePath string // github.com/etcd-io/etcd
View Source
var StrRelativePath string // github.com/etcd-io/etcd
View Source
var VecPathStats []PathStat
Functions ¶
func CountOccurrence ¶
func CountOccurrenceFile ¶
func IsPathIncluded ¶
func LastButOneIndex ¶
func ListAllPkgPaths ¶
func ListAllPkgPaths() []string
Types ¶
Click to show internal directories.
Click to hide internal directories.