Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultIgnoreCall lists functions that should be ignored when // determining if a function is pure. These calls may technically access // or modify global state, but the side effects are rarely important. DefaultIgnoreCall = map[string][]string{ "log": {"Print", "Printf", "Println"}, "fmt": {"Print", "Printf", "Println", "Errorf"}, } // DefaultIgnoreRead lists global variables that should be ignored // when determining if a function is pure. These variables may // change values between function calls, but in practice are most // often used as constants. DefaultIgnoreRead = map[string][]string{ "encoding/binary": {"BigEndian", "LittleEndian"}, } )
Functions ¶
func GenerateFuzz ¶
Types ¶
type CallGraph ¶
type CallGraph struct { Prog *loader.Program CallGraph *callgraph.Graph Mapping map[*ssa.Function]*Node IgnoreCall map[string][]string IgnoreRead map[string][]string }
CallGraph keeps track of 'pure' and function
func NewCallGraph ¶
NewCallGraph creates a CallGraph by performing ssa analysis
func (*CallGraph) Analyze ¶
Analyze examines the callgraph looking for functions that modify global state or call functions that modify global state.
func (*CallGraph) Impure ¶
Impure returns a slice of the ssa representations of the impure functions in the analyzed package
Click to show internal directories.
Click to hide internal directories.