diff options
author | Kostya Serebryany <kcc@google.com> | 2014-09-24 22:41:55 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2014-09-24 22:41:55 +0000 |
commit | 2f5d811ac018b4d8ea70c07c11358b0b2261c6e3 (patch) | |
tree | 21330f2d374d039195dda7bdbbace66488a1d62f | |
parent | 1ec0e694c26aea59ce2cf3d6a645fcfaffdb9d39 (diff) |
[asan] don't instrument module CTORs that may be run before asan.module_ctor. This fixes asan running together -coverage
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@218421 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/asan/TestCases/asan_and_llvm_coverage_test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/asan/TestCases/asan_and_llvm_coverage_test.cc b/test/asan/TestCases/asan_and_llvm_coverage_test.cc new file mode 100644 index 000000000..712d34d32 --- /dev/null +++ b/test/asan/TestCases/asan_and_llvm_coverage_test.cc @@ -0,0 +1,9 @@ +// RUN: %clangxx_asan -coverage -O0 %s -o %t +// RUN: env ASAN_OPTIONS=check_initialization_order=1 %run %t 2>&1 | FileCheck %s +#include <stdio.h> +int foo() { return 1; } +int XXX = foo(); +int main() { + printf("PASS\n"); +// CHECK: PASS +} |