llvm-project/compiler-rt/test
Evgeniy Stepanov 99fa3e774d [hwasan] Stack instrumentation.
Summary:
Very basic stack instrumentation using tagged pointers.
Tag for N'th alloca in a function is built as XOR of:
 * base tag for the function, which is just some bits of SP (poor
   man's random)
 * small constant which is a function of N.

Allocas are aligned to 16 bytes. On every ReturnInst allocas are
re-tagged to catch use-after-return.

This implementation has a bunch of issues that will be taken care of
later:
1. lifetime intrinsics referring to tagged pointers are not
   recognized in SDAG. This effectively disables stack coloring.
2. Generated code is quite inefficient. There is one extra
   instruction at each memory access that adds the base tag to the
   untagged alloca address. It would be better to keep tagged SP in a
   callee-saved register and address allocas as an offset of that XOR
   retag, but that needs better coordination between hwasan
   instrumentation pass and prologue/epilogue insertion.
3. Lifetime instrinsics are ignored and use-after-scope is not
   implemented. This would be harder to do than in ASan, because we
   need to use a differently tagged pointer depending on which
   lifetime.start / lifetime.end the current instruction is dominated
   / post-dominated.

Reviewers: kcc, alekseyshl

Subscribers: srhines, kubamracek, javed.absar, hiraditya, llvm-commits

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

llvm-svn: 322324
2018-01-11 22:53:30 +00:00
..
BlocksRuntime
asan [cmake] Fix typo in test/asan/CMakeLists.txt 2018-01-03 21:29:49 +00:00
builtins These tests require x86 80-bit doubles. Mark them so. 2017-12-04 18:18:51 +00:00
cfi [ubsan] Re-commit: lit changes for lld testing, future lto testing. 2017-12-01 19:36:29 +00:00
dfsan [mips] XFAIL dfsan's custom.cc test on mips64. 2017-05-09 19:17:16 +00:00
esan [tsan] Update unittest for logging changes of r308637 2017-07-20 20:06:00 +00:00
fuzzer [libFuzzer] make the tests depend on ubsan 2017-12-15 01:39:52 +00:00
hwasan [hwasan] Stack instrumentation. 2018-01-11 22:53:30 +00:00
interception Revert "[interception] Check for export table's size before referring to its elements." 2017-01-22 03:30:14 +00:00
lsan [LSan] Disable a couple of failing tests on PPC64 (pending investigation). 2017-10-27 00:29:40 +00:00
msan [MSan] Enable use-after-dtor instrumentation by default. 2018-01-10 20:27:48 +00:00
profile Hide some symbols to avoid a crash on shutdown when using code coverage 2018-01-03 11:21:30 +00:00
safestack Factor out "stable-runtime" feature and enable it on all android. 2017-10-10 23:37:26 +00:00
sanitizer_common [Sanitizers] Export aligned new/delete from runtimes. 2017-12-23 00:30:51 +00:00
scudo [scudo] Attempt to re-enable the valloc test on armhf 2018-01-04 18:35:28 +00:00
tsan [CMake] Support runtimes and monorepo layouts when looking for libcxx 2017-12-12 01:20:52 +00:00
ubsan o -fsanitize=function warning when calling noexcept function through non-noexcept pointer in C++17 2018-01-05 07:57:24 +00:00
ubsan_minimal [ubsan] Re-commit: lit changes for lld testing, future lto testing. 2017-12-01 19:36:29 +00:00
xray [XRay][compiler-rt] Coalesce calls to mprotect to reduce patching overhead 2017-12-14 02:51:20 +00:00
CMakeLists.txt Allow compiler-rt test targets to work with multi-config CMake generators 2017-11-13 12:57:54 +00:00
lit.common.cfg [ubsan] Re-commit: lit changes for lld testing, future lto testing. 2017-12-01 19:36:29 +00:00
lit.common.configured.in [ubsan] Re-commit: lit changes for lld testing, future lto testing. 2017-12-01 19:36:29 +00:00