OSDN Git Service

[asan] Add instrumentation support for Myriad
authorWalter Lee <waltl@google.com>
Fri, 18 May 2018 04:10:38 +0000 (04:10 +0000)
committerWalter Lee <waltl@google.com>
Fri, 18 May 2018 04:10:38 +0000 (04:10 +0000)
commit6ff324a4d41b6424b889a59a9e454c9e1a5e805e
tree524b63d1e636fc90ed3d7d08984e339a8708d48d
parent83650cacf7edafa847c7064f74aa6ae6d8ae3d57
[asan] Add instrumentation support for Myriad

1. Define Myriad-specific ASan constants.

2. Add code to generate an outer loop that checks that the address is
   in DRAM range, and strip the cache bit from the address.  The
   former is required because Myriad has no memory protection, and it
   is up to the instrumentation to range-check before using it to
   index into the shadow memory.

3. Do not add an unreachable instruction after the error reporting
   function; on Myriad such function may return if the run-time has
   not been initialized.

4. Add a test.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332692 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/AddressSanitizer.cpp
test/Instrumentation/AddressSanitizer/basic-myriad.ll [new file with mode: 0644]