llvm-project/compiler-rt/lib
Kostya Kortchinsky efe3d3436a [scudo] Refactor ScudoChunk
Summary:
The initial implementation used an ASan like Chunk class that was deriving from
a Header class. Due to potential races, we ended up working with local copies
of the Header and never using the parent class fields. ScudoChunk was never
constructed but cast, and we were using `this` as the pointer needed for our
computations. This was meh.

So we refactored ScudoChunk to be now a series of static functions within the
namespace `__scudo::Chunk` that take a "user" pointer as first parameter (former
`this`). A compiled binary doesn't really change, but the code is more sensible.

Clang tends to inline all those small function (in -O2), but GCC left a few not
inlined, so we add the `INLINE` keyword to all.

Since we don't have `ScudoChunk` pointers anymore, a few variables were renamed
here and there to introduce a clearer distinction between a user pointer
(usually `Ptr`) and a backend pointer (`BackendPtr`).

Reviewers: alekseyshl, flowerhack

Reviewed By: alekseyshl

Subscribers: #sanitizers, llvm-commits

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

llvm-svn: 320745
2017-12-14 21:32:57 +00:00
..
BlocksRuntime [compiler-rt] Test commit: remove some trailing white spaces. 2017-08-25 19:36:30 +00:00
asan [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
builtins Add powerpc64 to compiler-rt build infrastructure. 2017-11-30 21:04:11 +00:00
cfi (NFC) Rename GetMax{,User}VirtualAddress. 2017-11-07 23:51:22 +00:00
dfsan [sanitizer_common] Move filesystem-related code out of sanitizer_common.cc 2017-07-22 01:46:40 +00:00
esan [esan] Fix compilation of signal handlers 2017-11-10 05:41:13 +00:00
fuzzer [libFuzzer] Add dummy call of LLVMFuzzerTestOneInput to afl_driver. 2017-12-13 22:02:44 +00:00
hwasan [hwasan] Inline instrumentation & fixed shadow. 2017-12-13 01:16:34 +00:00
interception [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
lsan Detect thread termination in LSan/NetBSD 2017-11-26 09:42:01 +00:00
msan Set of corrections for MSan/NetBSD 2017-12-14 01:20:16 +00:00
profile [profile] Port the runtime to Solaris (retry) 2017-12-14 19:01:04 +00:00
safestack Enable SafeStack on NetBSD 2017-08-10 18:40:09 +00:00
sanitizer_common [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
scudo [scudo] Refactor ScudoChunk 2017-12-14 21:32:57 +00:00
stats Support compiler-rt builtins 2017-07-28 03:39:38 +00:00
tsan [CMake] Support runtimes and monorepo layouts when looking for libcxx 2017-12-12 01:20:52 +00:00
ubsan [Sanitizers] Basic sanitizer Solaris support (PR 33274) 2017-12-14 20:14:29 +00:00
ubsan_minimal [ubsan-minimal] Get rid of the libc++ dependency. 2017-11-11 02:32:02 +00:00
xray [XRay][compiler-rt] Coalesce calls to mprotect to reduce patching overhead 2017-12-14 02:51:20 +00:00
CMakeLists.txt [cmake] Add a separate CMake var to control profile runtime 2017-10-02 05:03:55 +00:00