diff options
author | Derek Bruening <bruening@google.com> | 2016-04-21 21:32:25 +0000 |
---|---|---|
committer | Derek Bruening <bruening@google.com> | 2016-04-21 21:32:25 +0000 |
commit | 33f89a1f101182f2f316a3e142caa93d244b4ee7 (patch) | |
tree | e612c4052a65867414acb78ae588d500b20d7484 /test/esan/TestCases | |
parent | 94a44ec2b58ed284cb7175b7ed605ae8675a7de9 (diff) |
[esan] EfficiencySanitizer base runtime library
Summary:
Adds the initial version of a runtime library for the new
EfficiencySanitizer ("esan") family of tools. The library includes:
+ Slowpath code via callouts from the compiler instrumentation for
each memory access.
+ Registration of atexit() to call finalization code.
+ Runtime option flags controlled by the environment variable
ESAN_OPTIONS. The common sanitizer flags are supported such as
verbosity and log_path.
+ An initial simple test.
Still TODO: common code for libc interceptors and shadow memory mapping,
and tool-specific code for shadow state updating.
Reviewers: eugenis, vitalybuka, aizatsky, filcab
Subscribers: filcab, vkalintiris, kubabrecka, llvm-commits, zhaoqin, kcc
Differential Revision: http://reviews.llvm.org/D19168
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@267060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/esan/TestCases')
-rw-r--r-- | test/esan/TestCases/verbose-simple.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/esan/TestCases/verbose-simple.c b/test/esan/TestCases/verbose-simple.c new file mode 100644 index 000000000..e66648166 --- /dev/null +++ b/test/esan/TestCases/verbose-simple.c @@ -0,0 +1,11 @@ +// RUN: %clang_esan_frag -O0 %s -o %t 2>&1 +// RUN: %env_esan_opts=verbosity=1 %run %t 2>&1 | FileCheck %s + +#include <stdlib.h> +#include <string.h> +int main(int argc, char **argv) { + // CHECK: in esan::initializeLibrary + // CHECK-NEXT: in esan::finalizeLibrary + // CHECK-NEXT: {{.*}}EfficiencySanitizer is not finished: nothing yet to report + return 0; +} |