New MSan mapping layout (llvm part).
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 8 Oct 2015 21:35:26 +0000 (21:35 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Thu, 8 Oct 2015 21:35:26 +0000 (21:35 +0000)
commit2c87d24da09ecd2c14c38a0b4f7a0e3f332b08ee
treed2f0de4990e0683fcf1193a90657d27b31efa2ec
parent5771ec4c40a45e46db349fbb17ef017386c9a419
New MSan mapping layout (llvm part).

This is an implementation of
https://github.com/google/sanitizers/issues/579

It has a number of advantages over the current mapping:
* Works for non-PIE executables.
* Does not require ASLR; as a consequence, debugging MSan programs in
  gdb no longer requires "set disable-randomization off".
* Supports linux kernels >=4.1.2.
* The code is marginally faster and smaller.

This is an ABI break. We never really promised ABI stability, but
this patch includes a courtesy escape hatch: a compile-time macro
that reverts back to the old mapping layout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249753 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/MemorySanitizer.cpp
test/Instrumentation/MemorySanitizer/origin-alignment.ll