github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/compile/internal/pkginit/initAsanGlobals.go (about)

     1  // Copyright 2022 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package pkginit
     6  
     7  import (
     8  	"github.com/shogo82148/std/cmd/compile/internal/ir"
     9  )
    10  
    11  // Calculate redzone for globals.
    12  func GetRedzoneSizeForGlobal(size int64) int64
    13  
    14  // InstrumentGlobalsMap contains only package-local (and unlinknamed from somewhere else)
    15  // globals.
    16  // And the key is the object name. For example, in package p, a global foo would be in this
    17  // map as "foo".
    18  // Consider range over maps is nondeterministic, make a slice to hold all the values in the
    19  // InstrumentGlobalsMap and iterate over the InstrumentGlobalsSlice.
    20  var InstrumentGlobalsMap = make(map[string]ir.Node)
    21  var InstrumentGlobalsSlice = make([]ir.Node, 0, 0)