LLVM  4.0.0
Macros | Functions | Variables
AddressSanitizer.cpp File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/ASanStackFrameLayout.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include "llvm/Transforms/Utils/PromoteMemToReg.h"
#include <algorithm>
#include <iomanip>
#include <limits>
#include <sstream>
#include <string>
#include <system_error>
Include dependency graph for AddressSanitizer.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "asan"
 

Functions

 STATISTIC (NumInstrumentedReads,"Number of instrumented reads")
 
 STATISTIC (NumInstrumentedWrites,"Number of instrumented writes")
 
 STATISTIC (NumOptimizedAccessesToGlobalVar,"Number of optimized accesses to global vars")
 
 STATISTIC (NumOptimizedAccessesToStackVar,"Number of optimized accesses to stack vars")
 
 INITIALIZE_PASS_BEGIN (AddressSanitizer,"asan","AddressSanitizer: detects use-after-free and out-of-bounds bugs.", false, false) INITIALIZE_PASS_END(AddressSanitizer
 
 INITIALIZE_PASS (AddressSanitizerModule,"asan-module","AddressSanitizer: detects use-after-free and out-of-bounds bugs.""ModulePass", false, false) ModulePass *llvm
 
static size_t TypeSizeToSizeIndex (uint32_t TypeSize)
 
static GlobalVariablecreatePrivateGlobalForString (Module &M, StringRef Str, bool AllowMerging)
 
static GlobalVariablecreatePrivateGlobalForSourceLoc (Module &M, LocationMetadata MD)
 Create a global describing a source location. More...
 
static bool GlobalWasGeneratedByCompiler (GlobalVariable *G)
 Check if G has been created by a trusted compiler pass. More...
 
static bool isPointerOperand (Value *V)
 
static bool isInterestingPointerComparisonOrSubtraction (Instruction *I)
 
static void doInstrumentAddress (AddressSanitizer *Pass, Instruction *I, Instruction *InsertBefore, Value *Addr, unsigned Alignment, unsigned Granularity, uint32_t TypeSize, bool IsWrite, Value *SizeArgument, bool UseCalls, uint32_t Exp)
 
static void instrumentMaskedLoadOrStore (AddressSanitizer *Pass, const DataLayout &DL, Type *IntptrTy, Value *Mask, Instruction *I, Value *Addr, unsigned Alignment, unsigned Granularity, uint32_t TypeSize, bool IsWrite, Value *SizeArgument, bool UseCalls, uint32_t Exp)
 
static int StackMallocSizeClass (uint64_t LocalStackSize)
 

Variables

static const uint64_t kDefaultShadowScale = 3
 
static const uint64_t kDefaultShadowOffset32 = 1ULL << 29
 
static const uint64_t kDefaultShadowOffset64 = 1ULL << 44
 
static const uint64_t kDynamicShadowSentinel = ~(uint64_t)0
 
static const uint64_t kIOSShadowOffset32 = 1ULL << 30
 
static const uint64_t kIOSSimShadowOffset32 = 1ULL << 30
 
static const uint64_t kIOSSimShadowOffset64 = kDefaultShadowOffset64
 
static const uint64_t kSmallX86_64ShadowOffset = 0x7FFF8000
 
static const uint64_t kLinuxKasan_ShadowOffset64 = 0xdffffc0000000000
 
static const uint64_t kPPC64_ShadowOffset64 = 1ULL << 41
 
static const uint64_t kSystemZ_ShadowOffset64 = 1ULL << 52
 
static const uint64_t kMIPS32_ShadowOffset32 = 0x0aaa0000
 
static const uint64_t kMIPS64_ShadowOffset64 = 1ULL << 37
 
static const uint64_t kAArch64_ShadowOffset64 = 1ULL << 36
 
static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30
 
static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46
 
static const uint64_t kWindowsShadowOffset32 = 3ULL << 28
 
static const uint64_t kWindowsShadowOffset64 = kDynamicShadowSentinel
 
static const size_t kMinStackMallocSize = 1 << 6
 
static const size_t kMaxStackMallocSize = 1 << 16
 
static const uintptr_t kCurrentStackFrameMagic = 0x41B58AB3
 
static const uintptr_t kRetiredStackFrameMagic = 0x45E0360E
 
static const char *const kAsanModuleCtorName = "asan.module_ctor"
 
static const char *const kAsanModuleDtorName = "asan.module_dtor"
 
static const uint64_t kAsanCtorAndDtorPriority = 1
 
static const char *const kAsanReportErrorTemplate = "__asan_report_"
 
static const char *const kAsanRegisterGlobalsName = "__asan_register_globals"
 
static const char *const kAsanUnregisterGlobalsName
 
static const char *const kAsanRegisterImageGlobalsName
 
static const char *const kAsanUnregisterImageGlobalsName
 
static const char *const kAsanPoisonGlobalsName = "__asan_before_dynamic_init"
 
static const char *const kAsanUnpoisonGlobalsName = "__asan_after_dynamic_init"
 
static const char *const kAsanInitName = "__asan_init"
 
static const char *const kAsanVersionCheckName
 
static const char *const kAsanPtrCmp = "__sanitizer_ptr_cmp"
 
static const char *const kAsanPtrSub = "__sanitizer_ptr_sub"
 
static const char *const kAsanHandleNoReturnName = "__asan_handle_no_return"
 
static const int kMaxAsanStackMallocSizeClass = 10
 
static const char *const kAsanStackMallocNameTemplate = "__asan_stack_malloc_"
 
static const char *const kAsanStackFreeNameTemplate = "__asan_stack_free_"
 
static const char *const kAsanGenPrefix = "__asan_gen_"
 
static const char *const kODRGenPrefix = "__odr_asan_gen_"
 
static const char *const kSanCovGenPrefix = "__sancov_gen_"
 
static const char *const kAsanSetShadowPrefix = "__asan_set_shadow_"
 
static const char *const kAsanPoisonStackMemoryName
 
static const char *const kAsanUnpoisonStackMemoryName
 
static const char *const kAsanGlobalsRegisteredFlagName
 
static const char *const kAsanOptionDetectUseAfterReturn
 
static const char *const kAsanShadowMemoryDynamicAddress
 
static const char *const kAsanAllocaPoison = "__asan_alloca_poison"
 
static const char *const kAsanAllocasUnpoison = "__asan_allocas_unpoison"
 
static const size_t kNumberOfAccessSizes = 5
 
static const unsigned kAllocaRzSize = 32
 
static cl::opt< boolClEnableKasan ("asan-kernel", cl::desc("Enable KernelAddressSanitizer instrumentation"), cl::Hidden, cl::init(false))
 
static cl::opt< boolClRecover ("asan-recover", cl::desc("Enable recovery mode (continue-after-error)."), cl::Hidden, cl::init(false))
 
static cl::opt< boolClInstrumentReads ("asan-instrument-reads", cl::desc("instrument read instructions"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClInstrumentWrites ("asan-instrument-writes", cl::desc("instrument write instructions"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClInstrumentAtomics ("asan-instrument-atomics", cl::desc("instrument atomic instructions (rmw, cmpxchg)"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClAlwaysSlowPath ("asan-always-slow-path", cl::desc("use instrumentation with slow path for all accesses"), cl::Hidden, cl::init(false))
 
static cl::opt< boolClForceDynamicShadow ("asan-force-dynamic-shadow", cl::desc("Load shadow address into a local variable for each function"), cl::Hidden, cl::init(false))
 
static cl::opt< int > ClMaxInsnsToInstrumentPerBB ("asan-max-ins-per-bb", cl::init(10000), cl::desc("maximal number of instructions to instrument in any given BB"), cl::Hidden)
 
static cl::opt< boolClStack ("asan-stack", cl::desc("Handle stack memory"), cl::Hidden, cl::init(true))
 
static cl::opt< uint32_tClMaxInlinePoisoningSize ("asan-max-inline-poisoning-size", cl::desc("Inline shadow poisoning for blocks up to the given size in bytes."), cl::Hidden, cl::init(64))
 
static cl::opt< boolClUseAfterReturn ("asan-use-after-return", cl::desc("Check stack-use-after-return"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClUseAfterScope ("asan-use-after-scope", cl::desc("Check stack-use-after-scope"), cl::Hidden, cl::init(false))
 
static cl::opt< boolClGlobals ("asan-globals", cl::desc("Handle global objects"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClInitializers ("asan-initialization-order", cl::desc("Handle C++ initializer order"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClInvalidPointerPairs ("asan-detect-invalid-pointer-pair", cl::desc("Instrument <, <=, >, >=, - with pointer operands"), cl::Hidden, cl::init(false))
 
static cl::opt< unsignedClRealignStack ("asan-realign-stack", cl::desc("Realign stack to the value of this flag (power of two)"), cl::Hidden, cl::init(32))
 
static cl::opt< int > ClInstrumentationWithCallsThreshold ("asan-instrumentation-with-call-threshold", cl::desc("If the function being instrumented contains more than ""this number of memory accesses, use callbacks instead of ""inline checks (-1 means never use callbacks)."), cl::Hidden, cl::init(7000))
 
static cl::opt< std::string > ClMemoryAccessCallbackPrefix ("asan-memory-access-callback-prefix", cl::desc("Prefix for memory access callbacks"), cl::Hidden, cl::init("__asan_"))
 
static cl::opt< boolClInstrumentDynamicAllocas ("asan-instrument-dynamic-allocas", cl::desc("instrument dynamic allocas"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClSkipPromotableAllocas ("asan-skip-promotable-allocas", cl::desc("Do not instrument promotable allocas"), cl::Hidden, cl::init(true))
 
static cl::opt< int > ClMappingScale ("asan-mapping-scale", cl::desc("scale of asan shadow mapping"), cl::Hidden, cl::init(0))
 
static cl::opt< unsigned long
long > 
ClMappingOffset ("asan-mapping-offset", cl::desc("offset of asan shadow mapping [EXPERIMENTAL]"), cl::Hidden, cl::init(0))
 
static cl::opt< boolClOpt ("asan-opt", cl::desc("Optimize instrumentation"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClOptSameTemp ("asan-opt-same-temp", cl::desc("Instrument the same temp just once"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClOptGlobals ("asan-opt-globals", cl::desc("Don't instrument scalar globals"), cl::Hidden, cl::init(true))
 
static cl::opt< boolClOptStack ("asan-opt-stack", cl::desc("Don't instrument scalar stack variables"), cl::Hidden, cl::init(false))
 
static cl::opt< boolClDynamicAllocaStack ("asan-stack-dynamic-alloca", cl::desc("Use dynamic alloca to represent stack variables"), cl::Hidden, cl::init(true))
 
static cl::opt< uint32_tClForceExperiment ("asan-force-experiment", cl::desc("Force optimization experiment (for testing)"), cl::Hidden, cl::init(0))
 
static cl::opt< boolClUsePrivateAliasForGlobals ("asan-use-private-alias", cl::desc("Use private aliases for global"" variables"), cl::Hidden, cl::init(false))
 
static cl::opt< boolClUseMachOGlobalsSection ("asan-globals-live-support", cl::desc("Use linker features to support dead ""code stripping of globals ""(Mach-O only)"), cl::Hidden, cl::init(true))
 
static cl::opt< int > ClDebug ("asan-debug", cl::desc("debug"), cl::Hidden, cl::init(0))
 
static cl::opt< int > ClDebugStack ("asan-debug-stack", cl::desc("debug stack"), cl::Hidden, cl::init(0))
 
static cl::opt< std::string > ClDebugFunc ("asan-debug-func", cl::Hidden, cl::desc("Debug func"))
 
static cl::opt< int > ClDebugMin ("asan-debug-min", cl::desc("Debug min inst"), cl::Hidden, cl::init(-1))
 
static cl::opt< int > ClDebugMax ("asan-debug-max", cl::desc("Debug max inst"), cl::Hidden, cl::init(-1))
 
 asan
 
AddressSanitizer __pad0__
 
AddressSanitizer false
 

Macro Definition Documentation

#define DEBUG_TYPE   "asan"

Definition at line 65 of file AddressSanitizer.cpp.

Function Documentation

static GlobalVariable* createPrivateGlobalForSourceLoc ( Module M,
LocationMetadata  MD 
)
static
static GlobalVariable* createPrivateGlobalForString ( Module M,
StringRef  Str,
bool  AllowMerging 
)
static
static void doInstrumentAddress ( AddressSanitizer *  Pass,
Instruction I,
Instruction InsertBefore,
Value Addr,
unsigned  Alignment,
unsigned  Granularity,
uint32_t  TypeSize,
bool  IsWrite,
Value SizeArgument,
bool  UseCalls,
uint32_t  Exp 
)
static

Definition at line 1156 of file AddressSanitizer.cpp.

Referenced by instrumentMaskedLoadOrStore().

static bool GlobalWasGeneratedByCompiler ( GlobalVariable G)
static

Check if G has been created by a trusted compiler pass.

Definition at line 951 of file AddressSanitizer.cpp.

References llvm::Value::getName(), kAsanGenPrefix, kODRGenPrefix, kSanCovGenPrefix, and llvm::StringRef::startswith().

INITIALIZE_PASS ( AddressSanitizerModule  ,
"asan-module"  ,
"AddressSanitizer: detects use-after-free and out-of-bounds bugs.""ModulePass ,
false  ,
false   
)

Definition at line 903 of file AddressSanitizer.cpp.

References assert().

INITIALIZE_PASS_BEGIN ( AddressSanitizer  ,
"asan"  ,
"AddressSanitizer: detects use-after-free and out-of-bounds bugs."  ,
false  ,
false   
)
static void instrumentMaskedLoadOrStore ( AddressSanitizer *  Pass,
const DataLayout DL,
Type IntptrTy,
Value Mask,
Instruction I,
Value Addr,
unsigned  Alignment,
unsigned  Granularity,
uint32_t  TypeSize,
bool  IsWrite,
Value SizeArgument,
bool  UseCalls,
uint32_t  Exp 
)
static
static bool isInterestingPointerComparisonOrSubtraction ( Instruction I)
static

Definition at line 1125 of file AddressSanitizer.cpp.

References llvm::User::getOperand(), and isPointerOperand().

static bool isPointerOperand ( Value V)
static
static int StackMallocSizeClass ( uint64_t  LocalStackSize)
static
STATISTIC ( NumInstrumentedReads  ,
"Number of instrumented reads"   
)
STATISTIC ( NumInstrumentedWrites  ,
"Number of instrumented writes"   
)
STATISTIC ( NumOptimizedAccessesToGlobalVar  ,
"Number of optimized accesses to global vars"   
)
STATISTIC ( NumOptimizedAccessesToStackVar  ,
"Number of optimized accesses to stack vars"   
)
static size_t TypeSizeToSizeIndex ( uint32_t  TypeSize)
static

Definition at line 914 of file AddressSanitizer.cpp.

References assert(), llvm::countTrailingZeros(), and kNumberOfAccessSizes.

Variable Documentation

AddressSanitizer __pad0__

Definition at line 892 of file AddressSanitizer.cpp.

asan

Definition at line 892 of file AddressSanitizer.cpp.

cl::opt<bool> ClAlwaysSlowPath("asan-always-slow-path", cl::desc("use instrumentation with slow path for all accesses"), cl::Hidden, cl::init(false))
static
cl::opt<int> ClDebug("asan-debug", cl::desc("debug"), cl::Hidden, cl::init(0))
static
cl::opt<std::string> ClDebugFunc("asan-debug-func", cl::Hidden, cl::desc("Debug func"))
static
cl::opt<int> ClDebugMax("asan-debug-max", cl::desc("Debug max inst"), cl::Hidden, cl::init(-1))
static
cl::opt<int> ClDebugMin("asan-debug-min", cl::desc("Debug min inst"), cl::Hidden, cl::init(-1))
static
cl::opt<int> ClDebugStack("asan-debug-stack", cl::desc("debug stack"), cl::Hidden, cl::init(0))
static
cl::opt<bool> ClDynamicAllocaStack("asan-stack-dynamic-alloca", cl::desc("Use dynamic alloca to represent stack variables"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClEnableKasan("asan-kernel", cl::desc("Enable KernelAddressSanitizer instrumentation"), cl::Hidden, cl::init(false))
static
cl::opt<bool> ClForceDynamicShadow("asan-force-dynamic-shadow", cl::desc("Load shadow address into a local variable for each function"), cl::Hidden, cl::init(false))
static
cl::opt<uint32_t> ClForceExperiment("asan-force-experiment", cl::desc("Force optimization experiment (for testing)"), cl::Hidden, cl::init(0))
static
cl::opt<bool> ClGlobals("asan-globals", cl::desc("Handle global objects"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClInitializers("asan-initialization-order", cl::desc("Handle C++ initializer order"), cl::Hidden, cl::init(true))
static
cl::opt<int> ClInstrumentationWithCallsThreshold("asan-instrumentation-with-call-threshold", cl::desc("If the function being instrumented contains more than ""this number of memory accesses, use callbacks instead of ""inline checks (-1 means never use callbacks)."), cl::Hidden, cl::init(7000))
static
cl::opt<bool> ClInstrumentAtomics("asan-instrument-atomics", cl::desc("instrument atomic instructions (rmw, cmpxchg)"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClInstrumentDynamicAllocas("asan-instrument-dynamic-allocas", cl::desc("instrument dynamic allocas"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClInstrumentReads("asan-instrument-reads", cl::desc("instrument read instructions"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClInstrumentWrites("asan-instrument-writes", cl::desc("instrument write instructions"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClInvalidPointerPairs("asan-detect-invalid-pointer-pair", cl::desc("Instrument <, <=, >, >=, - with pointer operands"), cl::Hidden, cl::init(false))
static
cl::opt<unsigned long long> ClMappingOffset("asan-mapping-offset", cl::desc("offset of asan shadow mapping [EXPERIMENTAL]"), cl::Hidden, cl::init(0))
static
cl::opt<int> ClMappingScale("asan-mapping-scale", cl::desc("scale of asan shadow mapping"), cl::Hidden, cl::init(0))
static
cl::opt<uint32_t> ClMaxInlinePoisoningSize("asan-max-inline-poisoning-size", cl::desc("Inline shadow poisoning for blocks up to the given size in bytes."), cl::Hidden, cl::init(64))
static
cl::opt<int> ClMaxInsnsToInstrumentPerBB("asan-max-ins-per-bb", cl::init(10000), cl::desc("maximal number of instructions to instrument in any given BB"), cl::Hidden)
static
cl::opt<std::string> ClMemoryAccessCallbackPrefix("asan-memory-access-callback-prefix", cl::desc("Prefix for memory access callbacks"), cl::Hidden, cl::init("__asan_"))
static
cl::opt<bool> ClOpt("asan-opt", cl::desc("Optimize instrumentation"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClOptGlobals("asan-opt-globals", cl::desc("Don't instrument scalar globals"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClOptSameTemp("asan-opt-same-temp", cl::desc("Instrument the same temp just once"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClOptStack("asan-opt-stack", cl::desc("Don't instrument scalar stack variables"), cl::Hidden, cl::init(false))
static
cl::opt<unsigned> ClRealignStack("asan-realign-stack", cl::desc("Realign stack to the value of this flag (power of two)"), cl::Hidden, cl::init(32))
static
cl::opt<bool> ClRecover("asan-recover", cl::desc("Enable recovery mode (continue-after-error)."), cl::Hidden, cl::init(false))
static
cl::opt<bool> ClSkipPromotableAllocas("asan-skip-promotable-allocas", cl::desc("Do not instrument promotable allocas"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClStack("asan-stack", cl::desc("Handle stack memory"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClUseAfterReturn("asan-use-after-return", cl::desc("Check stack-use-after-return"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClUseAfterScope("asan-use-after-scope", cl::desc("Check stack-use-after-scope"), cl::Hidden, cl::init(false))
static
cl::opt<bool> ClUseMachOGlobalsSection("asan-globals-live-support", cl::desc("Use linker features to support dead ""code stripping of globals ""(Mach-O only)"), cl::Hidden, cl::init(true))
static
cl::opt<bool> ClUsePrivateAliasForGlobals("asan-use-private-alias", cl::desc("Use private aliases for global"" variables"), cl::Hidden, cl::init(false))
static
AddressSanitizer false

Definition at line 892 of file AddressSanitizer.cpp.

const uint64_t kAArch64_ShadowOffset64 = 1ULL << 36
static

Definition at line 80 of file AddressSanitizer.cpp.

const unsigned kAllocaRzSize = 32
static

Definition at line 137 of file AddressSanitizer.cpp.

const char* const kAsanAllocaPoison = "__asan_alloca_poison"
static

Definition at line 131 of file AddressSanitizer.cpp.

const char* const kAsanAllocasUnpoison = "__asan_allocas_unpoison"
static

Definition at line 132 of file AddressSanitizer.cpp.

const uint64_t kAsanCtorAndDtorPriority = 1
static

Definition at line 94 of file AddressSanitizer.cpp.

const char* const kAsanGenPrefix = "__asan_gen_"
static
const char* const kAsanGlobalsRegisteredFlagName
static
Initial value:
=
"__asan_globals_registered"

Definition at line 122 of file AddressSanitizer.cpp.

const char* const kAsanHandleNoReturnName = "__asan_handle_no_return"
static

Definition at line 110 of file AddressSanitizer.cpp.

const char* const kAsanInitName = "__asan_init"
static

Definition at line 105 of file AddressSanitizer.cpp.

const char* const kAsanModuleCtorName = "asan.module_ctor"
static

Definition at line 92 of file AddressSanitizer.cpp.

const char* const kAsanModuleDtorName = "asan.module_dtor"
static

Definition at line 93 of file AddressSanitizer.cpp.

const char* const kAsanOptionDetectUseAfterReturn
static
Initial value:
=
"__asan_option_detect_stack_use_after_return"

Definition at line 125 of file AddressSanitizer.cpp.

const char* const kAsanPoisonGlobalsName = "__asan_before_dynamic_init"
static

Definition at line 103 of file AddressSanitizer.cpp.

const char* const kAsanPoisonStackMemoryName
static
Initial value:
=
"__asan_poison_stack_memory"

Definition at line 118 of file AddressSanitizer.cpp.

const char* const kAsanPtrCmp = "__sanitizer_ptr_cmp"
static

Definition at line 108 of file AddressSanitizer.cpp.

const char* const kAsanPtrSub = "__sanitizer_ptr_sub"
static

Definition at line 109 of file AddressSanitizer.cpp.

const char* const kAsanRegisterGlobalsName = "__asan_register_globals"
static

Definition at line 96 of file AddressSanitizer.cpp.

const char* const kAsanRegisterImageGlobalsName
static
Initial value:
=
"__asan_register_image_globals"

Definition at line 99 of file AddressSanitizer.cpp.

const char* const kAsanReportErrorTemplate = "__asan_report_"
static

Definition at line 95 of file AddressSanitizer.cpp.

const char* const kAsanSetShadowPrefix = "__asan_set_shadow_"
static

Definition at line 117 of file AddressSanitizer.cpp.

const char* const kAsanShadowMemoryDynamicAddress
static
Initial value:
=
"__asan_shadow_memory_dynamic_address"

Definition at line 128 of file AddressSanitizer.cpp.

const char* const kAsanStackFreeNameTemplate = "__asan_stack_free_"
static

Definition at line 113 of file AddressSanitizer.cpp.

const char* const kAsanStackMallocNameTemplate = "__asan_stack_malloc_"
static

Definition at line 112 of file AddressSanitizer.cpp.

const char* const kAsanUnpoisonGlobalsName = "__asan_after_dynamic_init"
static

Definition at line 104 of file AddressSanitizer.cpp.

const char* const kAsanUnpoisonStackMemoryName
static
Initial value:
=
"__asan_unpoison_stack_memory"

Definition at line 120 of file AddressSanitizer.cpp.

const char* const kAsanUnregisterGlobalsName
static
Initial value:
=
"__asan_unregister_globals"

Definition at line 97 of file AddressSanitizer.cpp.

const char* const kAsanUnregisterImageGlobalsName
static
Initial value:
=
"__asan_unregister_image_globals"

Definition at line 101 of file AddressSanitizer.cpp.

const char* const kAsanVersionCheckName
static
Initial value:
=
"__asan_version_mismatch_check_v8"

Definition at line 106 of file AddressSanitizer.cpp.

const uintptr_t kCurrentStackFrameMagic = 0x41B58AB3
static

Definition at line 89 of file AddressSanitizer.cpp.

const uint64_t kDefaultShadowOffset32 = 1ULL << 29
static

Definition at line 68 of file AddressSanitizer.cpp.

const uint64_t kDefaultShadowOffset64 = 1ULL << 44
static

Definition at line 69 of file AddressSanitizer.cpp.

const uint64_t kDefaultShadowScale = 3
static

Definition at line 67 of file AddressSanitizer.cpp.

const uint64_t kDynamicShadowSentinel = ~(uint64_t)0
static

Definition at line 70 of file AddressSanitizer.cpp.

const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30
static

Definition at line 81 of file AddressSanitizer.cpp.

const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46
static

Definition at line 82 of file AddressSanitizer.cpp.

const uint64_t kIOSShadowOffset32 = 1ULL << 30
static

Definition at line 71 of file AddressSanitizer.cpp.

const uint64_t kIOSSimShadowOffset32 = 1ULL << 30
static

Definition at line 72 of file AddressSanitizer.cpp.

const uint64_t kIOSSimShadowOffset64 = kDefaultShadowOffset64
static

Definition at line 73 of file AddressSanitizer.cpp.

const uint64_t kLinuxKasan_ShadowOffset64 = 0xdffffc0000000000
static

Definition at line 75 of file AddressSanitizer.cpp.

const int kMaxAsanStackMallocSizeClass = 10
static

Definition at line 111 of file AddressSanitizer.cpp.

const size_t kMaxStackMallocSize = 1 << 16
static

Definition at line 88 of file AddressSanitizer.cpp.

Referenced by StackMallocSizeClass().

const size_t kMinStackMallocSize = 1 << 6
static

Definition at line 87 of file AddressSanitizer.cpp.

Referenced by StackMallocSizeClass().

const uint64_t kMIPS32_ShadowOffset32 = 0x0aaa0000
static

Definition at line 78 of file AddressSanitizer.cpp.

const uint64_t kMIPS64_ShadowOffset64 = 1ULL << 37
static

Definition at line 79 of file AddressSanitizer.cpp.

const size_t kNumberOfAccessSizes = 5
static

Definition at line 135 of file AddressSanitizer.cpp.

Referenced by TypeSizeToSizeIndex().

const char* const kODRGenPrefix = "__odr_asan_gen_"
static

Definition at line 115 of file AddressSanitizer.cpp.

Referenced by GlobalWasGeneratedByCompiler().

const uint64_t kPPC64_ShadowOffset64 = 1ULL << 41
static

Definition at line 76 of file AddressSanitizer.cpp.

const uintptr_t kRetiredStackFrameMagic = 0x45E0360E
static

Definition at line 90 of file AddressSanitizer.cpp.

const char* const kSanCovGenPrefix = "__sancov_gen_"
static

Definition at line 116 of file AddressSanitizer.cpp.

Referenced by GlobalWasGeneratedByCompiler().

const uint64_t kSmallX86_64ShadowOffset = 0x7FFF8000
static

Definition at line 74 of file AddressSanitizer.cpp.

const uint64_t kSystemZ_ShadowOffset64 = 1ULL << 52
static

Definition at line 77 of file AddressSanitizer.cpp.

const uint64_t kWindowsShadowOffset32 = 3ULL << 28
static

Definition at line 83 of file AddressSanitizer.cpp.

const uint64_t kWindowsShadowOffset64 = kDynamicShadowSentinel
static

Definition at line 85 of file AddressSanitizer.cpp.