LLVM  14.0.0git
Macros | Functions | Variables
AddressSanitizer.cpp File Reference
#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/BinaryFormat/MachO.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Comdat.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Use.h"
#include "llvm/IR/Value.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/ScopedPrinter.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Instrumentation/AddressSanitizerCommon.h"
#include "llvm/Transforms/Instrumentation/AddressSanitizerOptions.h"
#include "llvm/Transforms/Utils/ASanStackFrameLayout.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Local.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
#include "llvm/Transforms/Utils/PromoteMemToReg.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <iomanip>
#include <limits>
#include <memory>
#include <sstream>
#include <string>
#include <tuple>

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")
 
static ShadowMapping getShadowMapping (Triple &TargetTriple, int LongSize, bool IsKasan)
 
static uint64_t getRedzoneSizeForScale (int MappingScale)
 
static uint64_t GetCtorAndDtorPriority (Triple &TargetTriple)
 
INITIALIZE_PASS(ASanGlobalsMetadataWrapperPass, "asan-globals-md", "Read metadata to mark which globals should be instrumented " "when running ASan.", false, true) char AddressSanitizerLegacyPass INITIALIZE_PASS_BEGIN (AddressSanitizerLegacyPass, "asan", "AddressSanitizer: detects use-after-free and out-of-bounds bugs.", false, false) INITIALIZE_PASS_END(AddressSanitizerLegacyPass
 
 INITIALIZE_PASS (ModuleAddressSanitizerLegacyPass, "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 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 isUnsupportedAMDGPUAddrspace (Value *Addr)
 
static bool isPointerOperand (Value *V)
 
static bool isInterestingPointerComparison (Instruction *I)
 
static bool isInterestingPointerSubtraction (Instruction *I)
 
static void doInstrumentAddress (AddressSanitizer *Pass, Instruction *I, Instruction *InsertBefore, Value *Addr, MaybeAlign 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, MaybeAlign Alignment, unsigned Granularity, uint32_t TypeSize, bool IsWrite, Value *SizeArgument, bool UseCalls, uint32_t Exp)
 
static int StackMallocSizeClass (uint64_t LocalStackSize)
 
static void findStoresToUninstrumentedArgAllocas (AddressSanitizer &ASan, Instruction &InsBefore, SmallVectorImpl< Instruction * > &InitInsts)
 Collect instructions in the entry block after InsBefore which initialize permanent storage for a function argument. More...
 

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
 
static const uint64_t kSmallX86_64ShadowOffsetBase = 0x7FFFFFFF
 
static const uint64_t kSmallX86_64ShadowOffsetAlignMask = ~0xFFFULL
 
static const uint64_t kLinuxKasan_ShadowOffset64 = 0xdffffc0000000000
 
static const uint64_t kPPC64_ShadowOffset64 = 1ULL << 44
 
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 kRISCV64_ShadowOffset64 = 0xd55550000
 
static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30
 
static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46
 
static const uint64_t kFreeBSDKasan_ShadowOffset64 = 0xdffff7c000000000
 
static const uint64_t kNetBSD_ShadowOffset32 = 1ULL << 30
 
static const uint64_t kNetBSD_ShadowOffset64 = 1ULL << 46
 
static const uint64_t kNetBSDKasan_ShadowOffset64 = 0xdfff900000000000
 
static const uint64_t kPS4CPU_ShadowOffset64 = 1ULL << 40
 
static const uint64_t kWindowsShadowOffset32 = 3ULL << 28
 
static const uint64_t kEmscriptenShadowOffset = 0
 
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
 
const char kAsanModuleCtorName [] = "asan.module_ctor"
 
const char kAsanModuleDtorName [] = "asan.module_dtor"
 
static const uint64_t kAsanCtorAndDtorPriority = 1
 
static const uint64_t kAsanEmscriptenCtorAndDtorPriority = 50
 
const char kAsanReportErrorTemplate [] = "__asan_report_"
 
const char kAsanRegisterGlobalsName [] = "__asan_register_globals"
 
const char kAsanUnregisterGlobalsName [] = "__asan_unregister_globals"
 
const char kAsanRegisterImageGlobalsName [] = "__asan_register_image_globals"
 
const char kAsanUnregisterImageGlobalsName []
 
const char kAsanRegisterElfGlobalsName [] = "__asan_register_elf_globals"
 
const char kAsanUnregisterElfGlobalsName [] = "__asan_unregister_elf_globals"
 
const char kAsanPoisonGlobalsName [] = "__asan_before_dynamic_init"
 
const char kAsanUnpoisonGlobalsName [] = "__asan_after_dynamic_init"
 
const char kAsanInitName [] = "__asan_init"
 
const char kAsanVersionCheckNamePrefix [] = "__asan_version_mismatch_check_v"
 
const char kAsanPtrCmp [] = "__sanitizer_ptr_cmp"
 
const char kAsanPtrSub [] = "__sanitizer_ptr_sub"
 
const char kAsanHandleNoReturnName [] = "__asan_handle_no_return"
 
static const int kMaxAsanStackMallocSizeClass = 10
 
const char kAsanStackMallocNameTemplate [] = "__asan_stack_malloc_"
 
const char kAsanStackMallocAlwaysNameTemplate []
 
const char kAsanStackFreeNameTemplate [] = "__asan_stack_free_"
 
const char kAsanGenPrefix [] = "___asan_gen_"
 
const char kODRGenPrefix [] = "__odr_asan_gen_"
 
const char kSanCovGenPrefix [] = "__sancov_gen_"
 
const char kAsanSetShadowPrefix [] = "__asan_set_shadow_"
 
const char kAsanPoisonStackMemoryName [] = "__asan_poison_stack_memory"
 
const char kAsanUnpoisonStackMemoryName [] = "__asan_unpoison_stack_memory"
 
const char kAsanGlobalsRegisteredFlagName [] = "___asan_globals_registered"
 
const char kAsanOptionDetectUseAfterReturn []
 
const char kAsanShadowMemoryDynamicAddress []
 
const char kAsanAllocaPoison [] = "__asan_alloca_poison"
 
const char kAsanAllocasUnpoison [] = "__asan_allocas_unpoison"
 
const char kAMDGPUAddressSharedName [] = "llvm.amdgcn.is.shared"
 
const char kAMDGPUAddressPrivateName [] = "llvm.amdgcn.is.private"
 
static const size_t kNumberOfAccessSizes = 5
 
static const unsigned kAllocaRzSize = 32
 
static cl::opt< bool > ClEnableKasan ("asan-kernel", cl::desc("Enable KernelAddressSanitizer instrumentation"), cl::Hidden, cl::init(false))
 
static cl::opt< bool > ClRecover ("asan-recover", cl::desc("Enable recovery mode (continue-after-error)."), cl::Hidden, cl::init(false))
 
static cl::opt< bool > ClInsertVersionCheck ("asan-guard-against-version-mismatch", cl::desc("Guard against compiler/runtime version mismatch."), 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 > ClInstrumentAtomics ("asan-instrument-atomics", cl::desc("instrument atomic instructions (rmw, cmpxchg)"), cl::Hidden, cl::init(true))
 
static cl::opt< bool > ClInstrumentByval ("asan-instrument-byval", cl::desc("instrument byval call arguments"), cl::Hidden, cl::init(true))
 
static 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< 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< bool > ClWithIfunc ("asan-with-ifunc", cl::desc("Access dynamic shadow through an ifunc global on " "platforms that support this"), cl::Hidden, cl::init(true))
 
static cl::opt< bool > ClWithIfuncSuppressRemat ("asan-with-ifunc-suppress-remat", cl::desc("Suppress rematerialization of dynamic shadow address by passing " "it through inline asm in prologue."), cl::Hidden, cl::init(true))
 
static cl::opt< intClMaxInsnsToInstrumentPerBB ("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< bool > ClStack ("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< AsanDetectStackUseAfterReturnModeClUseAfterReturn ("asan-use-after-return", cl::desc("Sets the mode of detection for stack-use-after-return."), cl::values(clEnumValN(AsanDetectStackUseAfterReturnMode::Never, "never", "Never detect stack use after return."), clEnumValN(AsanDetectStackUseAfterReturnMode::Runtime, "runtime", "Detect stack use after return if " "binary flag 'ASAN_OPTIONS=detect_stack_use_after_return' is set."), clEnumValN(AsanDetectStackUseAfterReturnMode::Always, "always", "Always detect stack use after return.")), cl::Hidden, cl::init(AsanDetectStackUseAfterReturnMode::Runtime))
 
static cl::opt< bool > ClRedzoneByvalArgs ("asan-redzone-byval-args", cl::desc("Create redzones for byval " "arguments (extra copy " "required)"), 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 > 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< bool > ClInvalidPointerPairs ("asan-detect-invalid-pointer-pair", cl::desc("Instrument <, <=, >, >=, - with pointer operands"), cl::Hidden, cl::init(false))
 
static cl::opt< bool > ClInvalidPointerCmp ("asan-detect-invalid-pointer-cmp", cl::desc("Instrument <, <=, >, >= with pointer operands"), cl::Hidden, cl::init(false))
 
static cl::opt< bool > ClInvalidPointerSub ("asan-detect-invalid-pointer-sub", cl::desc("Instrument - operations with pointer operands"), 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< intClInstrumentationWithCallsThreshold ("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< bool > ClInstrumentDynamicAllocas ("asan-instrument-dynamic-allocas", cl::desc("instrument dynamic allocas"), cl::Hidden, cl::init(true))
 
static cl::opt< bool > ClSkipPromotableAllocas ("asan-skip-promotable-allocas", cl::desc("Do not instrument promotable allocas"), cl::Hidden, cl::init(true))
 
static cl::opt< intClMappingScale ("asan-mapping-scale", cl::desc("scale of asan shadow mapping"), cl::Hidden, cl::init(0))
 
static cl::opt< uint64_tClMappingOffset ("asan-mapping-offset", cl::desc("offset of asan shadow mapping [EXPERIMENTAL]"), cl::Hidden, cl::init(0))
 
static cl::opt< bool > ClOpt ("asan-opt", cl::desc("Optimize instrumentation"), 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 > ClOptGlobals ("asan-opt-globals", cl::desc("Don't instrument scalar globals"), 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< bool > ClDynamicAllocaStack ("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< bool > ClUsePrivateAlias ("asan-use-private-alias", cl::desc("Use private aliases for global variables"), cl::Hidden, cl::init(false))
 
static cl::opt< bool > ClUseOdrIndicator ("asan-use-odr-indicator", cl::desc("Use odr indicators to improve ODR reporting"), cl::Hidden, cl::init(false))
 
static cl::opt< bool > ClUseGlobalsGC ("asan-globals-live-support", cl::desc("Use linker features to support dead " "code stripping of globals"), cl::Hidden, cl::init(true))
 
static cl::opt< bool > ClWithComdat ("asan-with-comdat", cl::desc("Place ASan constructors in comdat sections"), cl::Hidden, cl::init(true))
 
static cl::opt< AsanDtorKindClOverrideDestructorKind ("asan-destructor-kind", cl::desc("Sets the ASan destructor kind. The default is to use the value " "provided to the pass constructor"), cl::values(clEnumValN(AsanDtorKind::None, "none", "No destructors"), clEnumValN(AsanDtorKind::Global, "global", "Use global destructors")), cl::init(AsanDtorKind::Invalid), cl::Hidden)
 
static cl::opt< intClDebug ("asan-debug", cl::desc("debug"), cl::Hidden, cl::init(0))
 
static cl::opt< intClDebugStack ("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< intClDebugMin ("asan-debug-min", cl::desc("Debug min inst"), cl::Hidden, cl::init(-1))
 
static cl::opt< intClDebugMax ("asan-debug-max", cl::desc("Debug max inst"), cl::Hidden, cl::init(-1))
 
INITIALIZE_PASS(ASanGlobalsMetadataWrapperPass, "asan-globals-md", "Read metadata to mark which globals should be instrumented " "when running ASan.", false, true) char AddressSanitizerLegacyPass asan
 
INITIALIZE_PASS(ASanGlobalsMetadataWrapperPass, "asan-globals-md", "Read metadata to mark which globals should be instrumented " "when running ASan.", false, true) char AddressSanitizerLegacyPass AddressSanitizer
 
INITIALIZE_PASS(ASanGlobalsMetadataWrapperPass, "asan-globals-md", "Read metadata to mark which globals should be instrumented " "when running ASan.", false, true) char AddressSanitizerLegacyPass false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "asan"

Definition at line 94 of file AddressSanitizer.cpp.

Function Documentation

◆ createPrivateGlobalForSourceLoc()

static GlobalVariable* createPrivateGlobalForSourceLoc ( Module M,
LocationMetadata  MD 
)
static

◆ doInstrumentAddress()

static void doInstrumentAddress ( AddressSanitizer Pass,
Instruction I,
Instruction InsertBefore,
Value Addr,
MaybeAlign  Alignment,
unsigned  Granularity,
uint32_t  TypeSize,
bool  IsWrite,
Value SizeArgument,
bool  UseCalls,
uint32_t  Exp 
)
static

Definition at line 1547 of file AddressSanitizer.cpp.

References Addr, and I.

Referenced by instrumentMaskedLoadOrStore().

◆ findStoresToUninstrumentedArgAllocas()

static void findStoresToUninstrumentedArgAllocas ( AddressSanitizer ASan,
Instruction InsBefore,
SmallVectorImpl< Instruction * > &  InitInsts 
)
static

Collect instructions in the entry block after InsBefore which initialize permanent storage for a function argument.

These instructions must remain in the entry block so that uninitialized values do not appear in backtraces. An added benefit is that this conserves spill slots. This does not move stores before instrumented / "interesting" allocas.

Definition at line 3160 of file AddressSanitizer.cpp.

◆ GetCtorAndDtorPriority()

static uint64_t GetCtorAndDtorPriority ( Triple TargetTriple)
static

◆ getRedzoneSizeForScale()

static uint64_t getRedzoneSizeForScale ( int  MappingScale)
static

Definition at line 562 of file AddressSanitizer.cpp.

References llvm::max().

◆ getShadowMapping()

static ShadowMapping getShadowMapping ( Triple TargetTriple,
int  LongSize,
bool  IsKasan 
)
static

◆ GlobalWasGeneratedByCompiler()

static bool GlobalWasGeneratedByCompiler ( GlobalVariable G)
static

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

Definition at line 1322 of file AddressSanitizer.cpp.

References G, kAsanGenPrefix, kODRGenPrefix, and kSanCovGenPrefix.

◆ INITIALIZE_PASS()

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

Definition at line 1285 of file AddressSanitizer.cpp.

References assert().

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS (ASanGlobalsMetadataWrapperPass, "asan-globals-md", "Read metadata to mark which globals should be instrumented " "when running ASan.", false, true) char AddressSanitizerLegacyPass INITIALIZE_PASS_BEGIN ( AddressSanitizerLegacyPass  ,
"asan"  ,
"AddressSanitizer: detects use-after-free and out-of-bounds bugs."  ,
false  ,
false   
)

◆ instrumentMaskedLoadOrStore()

static void instrumentMaskedLoadOrStore ( AddressSanitizer Pass,
const DataLayout DL,
Type IntptrTy,
Value Mask,
Instruction I,
Value Addr,
MaybeAlign  Alignment,
unsigned  Granularity,
uint32_t  TypeSize,
bool  IsWrite,
Value SizeArgument,
bool  UseCalls,
uint32_t  Exp 
)
static

◆ isInterestingPointerComparison()

static bool isInterestingPointerComparison ( Instruction I)
static

Definition at line 1500 of file AddressSanitizer.cpp.

References I, and isPointerOperand().

◆ isInterestingPointerSubtraction()

static bool isInterestingPointerSubtraction ( Instruction I)
static

Definition at line 1514 of file AddressSanitizer.cpp.

References I, and isPointerOperand().

◆ isPointerOperand()

static bool isPointerOperand ( Value V)
static

◆ isUnsupportedAMDGPUAddrspace()

static bool isUnsupportedAMDGPUAddrspace ( Value Addr)
static

Definition at line 1340 of file AddressSanitizer.cpp.

References Addr, and llvm::Type::getPointerAddressSpace().

◆ StackMallocSizeClass()

static int StackMallocSizeClass ( uint64_t  LocalStackSize)
static

◆ STATISTIC() [1/4]

STATISTIC ( NumInstrumentedReads  ,
"Number of instrumented reads"   
)

◆ STATISTIC() [2/4]

STATISTIC ( NumInstrumentedWrites  ,
"Number of instrumented writes"   
)

◆ STATISTIC() [3/4]

STATISTIC ( NumOptimizedAccessesToGlobalVar  ,
"Number of optimized accesses to global vars"   
)

◆ STATISTIC() [4/4]

STATISTIC ( NumOptimizedAccessesToStackVar  ,
"Number of optimized accesses to stack vars"   
)

◆ TypeSizeToSizeIndex()

static size_t TypeSizeToSizeIndex ( uint32_t  TypeSize)
static

Definition at line 1299 of file AddressSanitizer.cpp.

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

Variable Documentation

◆ AddressSanitizer

INITIALIZE_PASS (ASanGlobalsMetadataWrapperPass, "asan-globals-md", "Read metadata to mark which globals should be instrumented " "when running ASan.", false, true) char AddressSanitizerLegacyPass AddressSanitizer

Definition at line 1272 of file AddressSanitizer.cpp.

Referenced by llvm::AddressSanitizerPass::run().

◆ asan

INITIALIZE_PASS (ASanGlobalsMetadataWrapperPass, "asan-globals-md", "Read metadata to mark which globals should be instrumented " "when running ASan.", false, true) char AddressSanitizerLegacyPass asan

Definition at line 1271 of file AddressSanitizer.cpp.

◆ ClAlwaysSlowPath

cl::opt<bool> ClAlwaysSlowPath("asan-always-slow-path", cl::desc("use instrumentation with slow path for all accesses"), cl::Hidden, cl::init(false))
static

◆ ClDebug

cl::opt<int> ClDebug("asan-debug", cl::desc("debug"), cl::Hidden, cl::init(0))
static

◆ ClDebugFunc

cl::opt<std::string> ClDebugFunc("asan-debug-func", cl::Hidden, cl::desc("Debug func"))
static

◆ ClDebugMax

cl::opt<int> ClDebugMax("asan-debug-max", cl::desc("Debug max inst"), cl::Hidden, cl::init(-1))
static

◆ ClDebugMin

cl::opt<int> ClDebugMin("asan-debug-min", cl::desc("Debug min inst"), cl::Hidden, cl::init(-1))
static

◆ ClDebugStack

cl::opt<int> ClDebugStack("asan-debug-stack", cl::desc("debug stack"), cl::Hidden, cl::init(0))
static

◆ ClDynamicAllocaStack

cl::opt<bool> ClDynamicAllocaStack("asan-stack-dynamic-alloca", cl::desc("Use dynamic alloca to represent stack variables"), cl::Hidden, cl::init(true))
static

◆ ClEnableKasan

cl::opt<bool> ClEnableKasan("asan-kernel", cl::desc("Enable KernelAddressSanitizer instrumentation"), cl::Hidden, cl::init(false))
static

◆ ClForceDynamicShadow

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

Referenced by getShadowMapping().

◆ ClForceExperiment

cl::opt<uint32_t> ClForceExperiment("asan-force-experiment", cl::desc("Force optimization experiment (for testing)"), cl::Hidden, cl::init(0))
static

◆ ClGlobals

cl::opt<bool> ClGlobals("asan-globals", cl::desc("Handle global objects"), cl::Hidden, cl::init(true))
static

◆ ClInitializers

cl::opt<bool> ClInitializers("asan-initialization-order", cl::desc("Handle C++ initializer order"), cl::Hidden, cl::init(true))
static

◆ ClInsertVersionCheck

cl::opt<bool> ClInsertVersionCheck("asan-guard-against-version-mismatch", cl::desc("Guard against compiler/runtime version mismatch."), cl::Hidden, cl::init(true))
static

◆ ClInstrumentationWithCallsThreshold

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

◆ ClInstrumentAtomics

cl::opt<bool> ClInstrumentAtomics("asan-instrument-atomics", cl::desc("instrument atomic instructions (rmw, cmpxchg)"), cl::Hidden, cl::init(true))
static

◆ ClInstrumentByval

cl::opt<bool> ClInstrumentByval("asan-instrument-byval", cl::desc("instrument byval call arguments"), cl::Hidden, cl::init(true))
static

◆ ClInstrumentDynamicAllocas

cl::opt<bool> ClInstrumentDynamicAllocas("asan-instrument-dynamic-allocas", cl::desc("instrument dynamic allocas"), cl::Hidden, cl::init(true))
static

◆ ClInstrumentReads

cl::opt<bool> ClInstrumentReads("asan-instrument-reads", cl::desc("instrument read instructions"), cl::Hidden, cl::init(true))
static

◆ ClInstrumentWrites

cl::opt<bool> ClInstrumentWrites("asan-instrument-writes", cl::desc("instrument write instructions"), cl::Hidden, cl::init(true))
static

◆ ClInvalidPointerCmp

cl::opt<bool> ClInvalidPointerCmp("asan-detect-invalid-pointer-cmp", cl::desc("Instrument <, <=, >, >= with pointer operands"), cl::Hidden, cl::init(false))
static

◆ ClInvalidPointerPairs

cl::opt<bool> ClInvalidPointerPairs("asan-detect-invalid-pointer-pair", cl::desc("Instrument <, <=, >, >=, - with pointer operands"), cl::Hidden, cl::init(false))
static

◆ ClInvalidPointerSub

cl::opt<bool> ClInvalidPointerSub("asan-detect-invalid-pointer-sub", cl::desc("Instrument - operations with pointer operands"), cl::Hidden, cl::init(false))
static

◆ ClMappingOffset

cl::opt<uint64_t> ClMappingOffset("asan-mapping-offset", cl::desc("offset of asan shadow mapping [EXPERIMENTAL]"), cl::Hidden, cl::init(0))
static

Referenced by getShadowMapping().

◆ ClMappingScale

cl::opt<int> ClMappingScale("asan-mapping-scale", cl::desc("scale of asan shadow mapping"), cl::Hidden, cl::init(0))
static

Referenced by getShadowMapping().

◆ ClMaxInlinePoisoningSize

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

◆ ClMaxInsnsToInstrumentPerBB

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

◆ ClMemoryAccessCallbackPrefix

cl::opt<std::string> ClMemoryAccessCallbackPrefix("asan-memory-access-callback-prefix", cl::desc("Prefix for memory access callbacks"), cl::Hidden, cl::init("__asan_"))
static

◆ ClOpt

cl::opt<bool> ClOpt("asan-opt", cl::desc("Optimize instrumentation"), cl::Hidden, cl::init(true))
static

◆ ClOptGlobals

cl::opt<bool> ClOptGlobals("asan-opt-globals", cl::desc("Don't instrument scalar globals"), cl::Hidden, cl::init(true))
static

◆ ClOptSameTemp

cl::opt<bool> ClOptSameTemp("asan-opt-same-temp", cl::desc("Instrument the same temp just once"), cl::Hidden, cl::init(true))
static

◆ ClOptStack

cl::opt<bool> ClOptStack("asan-opt-stack", cl::desc("Don't instrument scalar stack variables"), cl::Hidden, cl::init(false))
static

◆ ClOverrideDestructorKind

cl::opt<AsanDtorKind> ClOverrideDestructorKind("asan-destructor-kind", cl::desc("Sets the ASan destructor kind. The default is to use the value " "provided to the pass constructor"), cl::values(clEnumValN(AsanDtorKind::None, "none", "No destructors"), clEnumValN(AsanDtorKind::Global, "global", "Use global destructors")), cl::init(AsanDtorKind::Invalid), cl::Hidden)
static

◆ ClRealignStack

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

◆ ClRecover

cl::opt<bool> ClRecover("asan-recover", cl::desc("Enable recovery mode (continue-after-error)."), cl::Hidden, cl::init(false))
static

◆ ClRedzoneByvalArgs

cl::opt<bool> ClRedzoneByvalArgs("asan-redzone-byval-args", cl::desc("Create redzones for byval " "arguments (extra copy " "required)"), cl::Hidden, cl::init(true))
static

◆ ClSkipPromotableAllocas

cl::opt<bool> ClSkipPromotableAllocas("asan-skip-promotable-allocas", cl::desc("Do not instrument promotable allocas"), cl::Hidden, cl::init(true))
static

◆ ClStack

cl::opt<bool> ClStack("asan-stack", cl::desc("Handle stack memory"), cl::Hidden, cl::init(true))
static

◆ ClUseAfterReturn

cl::opt<AsanDetectStackUseAfterReturnMode> ClUseAfterReturn("asan-use-after-return", cl::desc("Sets the mode of detection for stack-use-after-return."), cl::values( clEnumValN(AsanDetectStackUseAfterReturnMode::Never, "never", "Never detect stack use after return."), clEnumValN( AsanDetectStackUseAfterReturnMode::Runtime, "runtime", "Detect stack use after return if " "binary flag 'ASAN_OPTIONS=detect_stack_use_after_return' is set."), clEnumValN(AsanDetectStackUseAfterReturnMode::Always, "always", "Always detect stack use after return.")), cl::Hidden, cl::init(AsanDetectStackUseAfterReturnMode::Runtime))
static

◆ ClUseAfterScope

cl::opt<bool> ClUseAfterScope("asan-use-after-scope", cl::desc("Check stack-use-after-scope"), cl::Hidden, cl::init(false))
static

◆ ClUseGlobalsGC

cl::opt<bool> ClUseGlobalsGC("asan-globals-live-support", cl::desc("Use linker features to support dead " "code stripping of globals"), cl::Hidden, cl::init(true))
static

◆ ClUseOdrIndicator

cl::opt<bool> ClUseOdrIndicator("asan-use-odr-indicator", cl::desc("Use odr indicators to improve ODR reporting"), cl::Hidden, cl::init(false))
static

◆ ClUsePrivateAlias

cl::opt<bool> ClUsePrivateAlias("asan-use-private-alias", cl::desc("Use private aliases for global variables"), cl::Hidden, cl::init(false))
static

◆ ClWithComdat

cl::opt<bool> ClWithComdat("asan-with-comdat", cl::desc("Place ASan constructors in comdat sections"), cl::Hidden, cl::init(true))
static

◆ ClWithIfunc

cl::opt<bool> ClWithIfunc("asan-with-ifunc", cl::desc("Access dynamic shadow through an ifunc global on " "platforms that support this"), cl::Hidden, cl::init(true))
static

Referenced by getShadowMapping().

◆ ClWithIfuncSuppressRemat

cl::opt<bool> ClWithIfuncSuppressRemat("asan-with-ifunc-suppress-remat", cl::desc("Suppress rematerialization of dynamic shadow address by passing " "it through inline asm in prologue."), cl::Hidden, cl::init(true))
static

◆ false

INITIALIZE_PASS (ASanGlobalsMetadataWrapperPass, "asan-globals-md", "Read metadata to mark which globals should be instrumented " "when running ASan.", false, true) char AddressSanitizerLegacyPass false

Definition at line 1272 of file AddressSanitizer.cpp.

◆ kAArch64_ShadowOffset64

const uint64_t kAArch64_ShadowOffset64 = 1ULL << 36
static

Definition at line 108 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kAllocaRzSize

const unsigned kAllocaRzSize = 32
static

Definition at line 179 of file AddressSanitizer.cpp.

◆ kAMDGPUAddressPrivateName

const char kAMDGPUAddressPrivateName[] = "llvm.amdgcn.is.private"

Definition at line 174 of file AddressSanitizer.cpp.

◆ kAMDGPUAddressSharedName

const char kAMDGPUAddressSharedName[] = "llvm.amdgcn.is.shared"

Definition at line 173 of file AddressSanitizer.cpp.

◆ kAsanAllocaPoison

const char kAsanAllocaPoison[] = "__asan_alloca_poison"

Definition at line 170 of file AddressSanitizer.cpp.

◆ kAsanAllocasUnpoison

const char kAsanAllocasUnpoison[] = "__asan_allocas_unpoison"

Definition at line 171 of file AddressSanitizer.cpp.

◆ kAsanCtorAndDtorPriority

const uint64_t kAsanCtorAndDtorPriority = 1
static

Definition at line 130 of file AddressSanitizer.cpp.

Referenced by GetCtorAndDtorPriority().

◆ kAsanEmscriptenCtorAndDtorPriority

const uint64_t kAsanEmscriptenCtorAndDtorPriority = 50
static

Definition at line 132 of file AddressSanitizer.cpp.

Referenced by GetCtorAndDtorPriority().

◆ kAsanGenPrefix

const char kAsanGenPrefix[] = "___asan_gen_"

◆ kAsanGlobalsRegisteredFlagName

const char kAsanGlobalsRegisteredFlagName[] = "___asan_globals_registered"

Definition at line 162 of file AddressSanitizer.cpp.

◆ kAsanHandleNoReturnName

const char kAsanHandleNoReturnName[] = "__asan_handle_no_return"

Definition at line 147 of file AddressSanitizer.cpp.

◆ kAsanInitName

const char kAsanInitName[] = "__asan_init"

Definition at line 143 of file AddressSanitizer.cpp.

◆ kAsanModuleCtorName

const char kAsanModuleCtorName[] = "asan.module_ctor"

Definition at line 128 of file AddressSanitizer.cpp.

◆ kAsanModuleDtorName

const char kAsanModuleDtorName[] = "asan.module_dtor"

Definition at line 129 of file AddressSanitizer.cpp.

◆ kAsanOptionDetectUseAfterReturn

const char kAsanOptionDetectUseAfterReturn[]
Initial value:
=
"__asan_option_detect_stack_use_after_return"

Definition at line 164 of file AddressSanitizer.cpp.

◆ kAsanPoisonGlobalsName

const char kAsanPoisonGlobalsName[] = "__asan_before_dynamic_init"

Definition at line 141 of file AddressSanitizer.cpp.

◆ kAsanPoisonStackMemoryName

const char kAsanPoisonStackMemoryName[] = "__asan_poison_stack_memory"

Definition at line 157 of file AddressSanitizer.cpp.

◆ kAsanPtrCmp

const char kAsanPtrCmp[] = "__sanitizer_ptr_cmp"

Definition at line 145 of file AddressSanitizer.cpp.

◆ kAsanPtrSub

const char kAsanPtrSub[] = "__sanitizer_ptr_sub"

Definition at line 146 of file AddressSanitizer.cpp.

◆ kAsanRegisterElfGlobalsName

const char kAsanRegisterElfGlobalsName[] = "__asan_register_elf_globals"

Definition at line 139 of file AddressSanitizer.cpp.

◆ kAsanRegisterGlobalsName

const char kAsanRegisterGlobalsName[] = "__asan_register_globals"

Definition at line 134 of file AddressSanitizer.cpp.

◆ kAsanRegisterImageGlobalsName

const char kAsanRegisterImageGlobalsName[] = "__asan_register_image_globals"

Definition at line 136 of file AddressSanitizer.cpp.

◆ kAsanReportErrorTemplate

const char kAsanReportErrorTemplate[] = "__asan_report_"

Definition at line 133 of file AddressSanitizer.cpp.

◆ kAsanSetShadowPrefix

const char kAsanSetShadowPrefix[] = "__asan_set_shadow_"

Definition at line 156 of file AddressSanitizer.cpp.

◆ kAsanShadowMemoryDynamicAddress

const char kAsanShadowMemoryDynamicAddress[]
Initial value:
=
"__asan_shadow_memory_dynamic_address"

Definition at line 167 of file AddressSanitizer.cpp.

◆ kAsanStackFreeNameTemplate

const char kAsanStackFreeNameTemplate[] = "__asan_stack_free_"

Definition at line 152 of file AddressSanitizer.cpp.

◆ kAsanStackMallocAlwaysNameTemplate

const char kAsanStackMallocAlwaysNameTemplate[]
Initial value:
=
"__asan_stack_malloc_always_"

Definition at line 150 of file AddressSanitizer.cpp.

◆ kAsanStackMallocNameTemplate

const char kAsanStackMallocNameTemplate[] = "__asan_stack_malloc_"

Definition at line 149 of file AddressSanitizer.cpp.

◆ kAsanUnpoisonGlobalsName

const char kAsanUnpoisonGlobalsName[] = "__asan_after_dynamic_init"

Definition at line 142 of file AddressSanitizer.cpp.

◆ kAsanUnpoisonStackMemoryName

const char kAsanUnpoisonStackMemoryName[] = "__asan_unpoison_stack_memory"

Definition at line 158 of file AddressSanitizer.cpp.

◆ kAsanUnregisterElfGlobalsName

const char kAsanUnregisterElfGlobalsName[] = "__asan_unregister_elf_globals"

Definition at line 140 of file AddressSanitizer.cpp.

◆ kAsanUnregisterGlobalsName

const char kAsanUnregisterGlobalsName[] = "__asan_unregister_globals"

Definition at line 135 of file AddressSanitizer.cpp.

◆ kAsanUnregisterImageGlobalsName

const char kAsanUnregisterImageGlobalsName[]
Initial value:
=
"__asan_unregister_image_globals"

Definition at line 137 of file AddressSanitizer.cpp.

◆ kAsanVersionCheckNamePrefix

const char kAsanVersionCheckNamePrefix[] = "__asan_version_mismatch_check_v"

Definition at line 144 of file AddressSanitizer.cpp.

◆ kCurrentStackFrameMagic

const uintptr_t kCurrentStackFrameMagic = 0x41B58AB3
static

Definition at line 125 of file AddressSanitizer.cpp.

◆ kDefaultShadowOffset32

const uint64_t kDefaultShadowOffset32 = 1ULL << 29
static

Definition at line 97 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kDefaultShadowOffset64

const uint64_t kDefaultShadowOffset64 = 1ULL << 44
static

Definition at line 98 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kDefaultShadowScale

const uint64_t kDefaultShadowScale = 3
static

Definition at line 96 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kDynamicShadowSentinel

const uint64_t kDynamicShadowSentinel
static
Initial value:

Definition at line 99 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kEmscriptenShadowOffset

const uint64_t kEmscriptenShadowOffset = 0
static

Definition at line 118 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kFreeBSD_ShadowOffset32

const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30
static

Definition at line 110 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kFreeBSD_ShadowOffset64

const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46
static

Definition at line 111 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kFreeBSDKasan_ShadowOffset64

const uint64_t kFreeBSDKasan_ShadowOffset64 = 0xdffff7c000000000
static

Definition at line 112 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kLinuxKasan_ShadowOffset64

const uint64_t kLinuxKasan_ShadowOffset64 = 0xdffffc0000000000
static

Definition at line 103 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kMaxAsanStackMallocSizeClass

const int kMaxAsanStackMallocSizeClass = 10
static

Definition at line 148 of file AddressSanitizer.cpp.

◆ kMaxStackMallocSize

const size_t kMaxStackMallocSize = 1 << 16
static

Definition at line 124 of file AddressSanitizer.cpp.

Referenced by StackMallocSizeClass().

◆ kMinStackMallocSize

const size_t kMinStackMallocSize = 1 << 6
static

Definition at line 123 of file AddressSanitizer.cpp.

Referenced by StackMallocSizeClass().

◆ kMIPS32_ShadowOffset32

const uint64_t kMIPS32_ShadowOffset32 = 0x0aaa0000
static

Definition at line 106 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kMIPS64_ShadowOffset64

const uint64_t kMIPS64_ShadowOffset64 = 1ULL << 37
static

Definition at line 107 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kNetBSD_ShadowOffset32

const uint64_t kNetBSD_ShadowOffset32 = 1ULL << 30
static

Definition at line 113 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kNetBSD_ShadowOffset64

const uint64_t kNetBSD_ShadowOffset64 = 1ULL << 46
static

Definition at line 114 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kNetBSDKasan_ShadowOffset64

const uint64_t kNetBSDKasan_ShadowOffset64 = 0xdfff900000000000
static

Definition at line 115 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kNumberOfAccessSizes

const size_t kNumberOfAccessSizes = 5
static

Definition at line 177 of file AddressSanitizer.cpp.

Referenced by TypeSizeToSizeIndex().

◆ kODRGenPrefix

const char kODRGenPrefix[] = "__odr_asan_gen_"

Definition at line 154 of file AddressSanitizer.cpp.

Referenced by GlobalWasGeneratedByCompiler().

◆ kPPC64_ShadowOffset64

const uint64_t kPPC64_ShadowOffset64 = 1ULL << 44
static

Definition at line 104 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kPS4CPU_ShadowOffset64

const uint64_t kPS4CPU_ShadowOffset64 = 1ULL << 40
static

Definition at line 116 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kRetiredStackFrameMagic

const uintptr_t kRetiredStackFrameMagic = 0x45E0360E
static

Definition at line 126 of file AddressSanitizer.cpp.

◆ kRISCV64_ShadowOffset64

const uint64_t kRISCV64_ShadowOffset64 = 0xd55550000
static

Definition at line 109 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kSanCovGenPrefix

const char kSanCovGenPrefix[] = "__sancov_gen_"

Definition at line 155 of file AddressSanitizer.cpp.

Referenced by GlobalWasGeneratedByCompiler().

◆ kSmallX86_64ShadowOffsetAlignMask

const uint64_t kSmallX86_64ShadowOffsetAlignMask = ~0xFFFULL
static

Definition at line 102 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kSmallX86_64ShadowOffsetBase

const uint64_t kSmallX86_64ShadowOffsetBase = 0x7FFFFFFF
static

Definition at line 101 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kSystemZ_ShadowOffset64

const uint64_t kSystemZ_ShadowOffset64 = 1ULL << 52
static

Definition at line 105 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kWindowsShadowOffset32

const uint64_t kWindowsShadowOffset32 = 3ULL << 28
static

Definition at line 117 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

◆ kWindowsShadowOffset64

const uint64_t kWindowsShadowOffset64 = kDynamicShadowSentinel
static

Definition at line 121 of file AddressSanitizer.cpp.

Referenced by getShadowMapping().

llvm::max
Align max(MaybeAlign Lhs, Align Rhs)
Definition: Alignment.h:340