1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib/Transforms/Instrumentation
Peter Collingbourne 590e5e5ec0 hwasan: Untag unwound stack frames by wrapping personality functions.
One problem with untagging memory in landing pads is that it only works
correctly if the function that catches the exception is instrumented.
If the function is uninstrumented, we have no opportunity to untag the
memory.

To address this, replace landing pad instrumentation with personality function
wrapping. Each function with an instrumented stack has its personality function
replaced with a wrapper provided by the runtime. Functions that did not have
a personality function to begin with also get wrappers if they may be unwound
past. As the unwinder calls personality functions during stack unwinding,
the original personality function is called and the function's stack frame is
untagged by the wrapper if the personality function instructs the unwinder
to keep unwinding. If unwinding stops at a landing pad, the function is
still responsible for untagging its stack frame if it resumes unwinding.

The old landing pad mechanism is preserved for compatibility with old runtimes.

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

llvm-svn: 369721
2019-08-23 01:28:44 +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 [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +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 [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
DataFlowSanitizer.cpp [DFSan] Add UnaryOperator visitor to DataFlowSanitizer 2019-06-19 15:11:41 +00:00
GCOVProfiling.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
HWAddressSanitizer.cpp hwasan: Untag unwound stack frames by wrapping personality functions. 2019-08-23 01:28:44 +00:00
IndirectCallPromotion.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +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 [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
PGOMemOPSizeOpt.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
PoisonChecking.cpp [PoisonChecking] Flesh out complete todo list for full coverage 2019-07-09 19:59:39 +00:00
SanitizerCoverage.cpp [Sanitizer] Remove unused functions 2019-08-20 22:56:40 +00:00
ThreadSanitizer.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00