llvm-project/llvm/lib/Transforms/Instrumentation
Peter Collingbourne 0930643ff6 hwasan: Instrument globals.
Globals are instrumented by adding a pointer tag to their symbol values
and emitting metadata into a special section that allows the runtime to tag
their memory when the library is loaded.

Due to order of initialization issues explained in more detail in the comments,
shadow initialization cannot happen during regular global initialization.
Instead, the location of the global section is marked using an ELF note,
and we require libc support for calling a function provided by the HWASAN
runtime when libraries are loaded and unloaded.

Based on ideas discussed with @evgeny777 in D56672.

Differential Revision: https://reviews.llvm.org/D65770

llvm-svn: 368102
2019-08-06 22:07:29 +00:00
..
AddressSanitizer.cpp [WebAssembly] Lower ASan constructor priority on Emscripten 2019-08-06 21:52:58 +00:00
BoundsChecking.cpp Add a 'dynamic' parameter to the objectsize intrinsic 2019-01-30 20:34:35 +00:00
CFGMST.h Use llvm::stable_sort 2019-04-23 14:51:27 +00:00
CGProfile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Add a transform pass to make the executable semantics of poison explicit in the IR 2019-07-09 18:49:29 +00:00
ControlHeightReduction.cpp [IR] SelectInst: add swapValues() utility 2019-08-01 12:31:35 +00:00
DataFlowSanitizer.cpp [DFSan] Add UnaryOperator visitor to DataFlowSanitizer 2019-06-19 15:11:41 +00:00
GCOVProfiling.cpp Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
HWAddressSanitizer.cpp hwasan: Instrument globals. 2019-08-06 22:07:29 +00:00
IndirectCallPromotion.cpp Change some dyn_cast to more apropriate isa. NFC 2019-04-05 16:16:23 +00:00
InstrOrderFile.cpp Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC 2019-08-05 05:43:48 +00:00
InstrProfiling.cpp [profile] Solaris ld supports __start___llvm_prof_data etc. labels 2019-06-20 21:27:06 +00:00
Instrumentation.cpp Reland the "[NewPM] Port Sancov" patch from rL365838. No functional 2019-07-25 20:53:15 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MaximumSpanningTree.h Use llvm::stable_sort 2019-04-23 14:51:27 +00:00
MemorySanitizer.cpp [IRBuilder] Introduce helpers for and/or of multiple values at once 2019-07-06 03:46:18 +00:00
PGOInstrumentation.cpp [PGO] Fix the buildbot failure in r362995 2019-06-10 23:20:04 +00:00
PGOMemOPSizeOpt.cpp Move DomTreeUpdater from IR to Analysis 2019-02-06 02:52:52 +00:00
PoisonChecking.cpp [PoisonChecking] Flesh out complete todo list for full coverage 2019-07-09 19:59:39 +00:00
SanitizerCoverage.cpp Reland the "[NewPM] Port Sancov" patch from rL365838. No functional 2019-07-25 20:53:15 +00:00
ThreadSanitizer.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00