[compiler-rt] r184540 - [ASan] Check that ASan user may include and use LSan headers

Alexey Samsonov samsonov at google.com
Fri Jun 21 04:11:45 PDT 2013


Author: samsonov
Date: Fri Jun 21 06:11:44 2013
New Revision: 184540

URL: http://llvm.org/viewvc/llvm-project?rev=184540&view=rev
Log:
[ASan] Check that ASan user may include and use LSan headers

Added:
    compiler-rt/trunk/lib/asan/lit_tests/TestCases/lsan_annotations.cc

Added: compiler-rt/trunk/lib/asan/lit_tests/TestCases/lsan_annotations.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/lsan_annotations.cc?rev=184540&view=auto
==============================================================================
--- compiler-rt/trunk/lib/asan/lit_tests/TestCases/lsan_annotations.cc (added)
+++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/lsan_annotations.cc Fri Jun 21 06:11:44 2013
@@ -0,0 +1,16 @@
+// Check that LSan annotations work fine.
+// RUN: %clangxx_asan -O0 %s -o %t && %t
+// RUN: %clangxx_asan -O3 %s -o %t && %t
+
+#include <sanitizer/lsan_interface.h>
+#include <stdlib.h>
+
+int main() {
+  int *x = new int;
+  __lsan_ignore_object(x);
+  {
+    __lsan::ScopedDisabler disabler;
+    double *y = new double;
+  }
+  return 0;
+}





More information about the llvm-commits mailing list