pkginit

Imports

Imports #

"cmd/compile/internal/base"
"cmd/compile/internal/ir"
"cmd/compile/internal/noder"
"cmd/compile/internal/objw"
"cmd/compile/internal/staticinit"
"cmd/compile/internal/typecheck"
"cmd/compile/internal/types"
"cmd/internal/obj"
"cmd/internal/objabi"
"cmd/internal/src"
"strings"
"cmd/compile/internal/base"
"cmd/compile/internal/ir"
"cmd/compile/internal/typecheck"
"cmd/compile/internal/types"
"cmd/internal/src"

Constants & Variables

InstrumentGlobalsMap var #

InstrumentGlobalsMap contains only package-local (and unlinknamed from somewhere else) globals. And the key is the object name. For example, in package p, a global foo would be in this map as "foo". Consider range over maps is nondeterministic, make a slice to hold all the values in the InstrumentGlobalsMap and iterate over the InstrumentGlobalsSlice.

var InstrumentGlobalsMap = *ast.CallExpr

InstrumentGlobalsSlice var #

var InstrumentGlobalsSlice = *ast.CallExpr

Functions

GetRedzoneSizeForGlobal function #

Calculate redzone for globals.

func GetRedzoneSizeForGlobal(size int64) int64

MakeTask function #

MakeTask makes an initialization record for the package, if necessary. See runtime/proc.go:initTask for its layout. The 3 tasks for initialization are: 1. Initialize all of the packages the current package depends on. 2. Initialize all the variables that have initializers. 3. Run any init functions.

func MakeTask()

canInstrumentGlobal function #

func canInstrumentGlobal(g ir.Node) bool

createtypes function #

func createtypes() (*types.Type, *types.Type, *types.Type)

instrumentGlobals function #

instrumentGlobals declares a global array of _asan_global structures and initializes it.

func instrumentGlobals(fn *ir.Func) *ir.Name

Generated with Arrow