Source file src/runtime/asan0.go

     1  // Copyright 2021 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  //go:build !asan
     6  
     7  // Dummy ASan support API, used when not built with -asan.
     8  
     9  package runtime
    10  
    11  import (
    12  	"unsafe"
    13  )
    14  
    15  const asanenabled = false
    16  const asanenabledBit = 0
    17  
    18  // Because asanenabled is false, none of these functions should be called.
    19  
    20  func asanread(addr unsafe.Pointer, sz uintptr)            { throw("asan") }
    21  func asanwrite(addr unsafe.Pointer, sz uintptr)           { throw("asan") }
    22  func asanunpoison(addr unsafe.Pointer, sz uintptr)        { throw("asan") }
    23  func asanpoison(addr unsafe.Pointer, sz uintptr)          { throw("asan") }
    24  func asanregisterglobals(addr unsafe.Pointer, sz uintptr) { throw("asan") }
    25  func lsanregisterrootregion(unsafe.Pointer, uintptr)      { throw("asan") }
    26  func lsanunregisterrootregion(unsafe.Pointer, uintptr)    { throw("asan") }
    27  func lsandoleakcheck()                                    { throw("asan") }
    28  

View as plain text