[compiler-rt] r218421 - [asan] don't instrument module CTORs that may be run before asan.module_ctor. This fixes asan running together -coverage

Kostya Serebryany kcc at google.com
Wed Sep 24 15:41:56 PDT 2014


Author: kcc
Date: Wed Sep 24 17:41:55 2014
New Revision: 218421

URL: http://llvm.org/viewvc/llvm-project?rev=218421&view=rev
Log:
[asan] don't instrument module CTORs that may be run before asan.module_ctor. This fixes asan running together -coverage 

Added:
    compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc

Added: compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc?rev=218421&view=auto
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc (added)
+++ compiler-rt/trunk/test/asan/TestCases/asan_and_llvm_coverage_test.cc Wed Sep 24 17:41:55 2014
@@ -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
+}





More information about the llvm-commits mailing list