diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2016-02-12 20:20:51 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2016-02-12 20:20:51 +0000 |
commit | eb649bcfb91e97920f488837db7b447f1eef3d1a (patch) | |
tree | 59846b1f0dbcfef0b551a326f83d4ee04ae9a946 /compiler-rt/test | |
parent | 7b3ef05a37fef2f805d31f498d30198ddeeb1a0c (diff) | |
download | bcm5719-llvm-eb649bcfb91e97920f488837db7b447f1eef3d1a.tar.gz bcm5719-llvm-eb649bcfb91e97920f488837db7b447f1eef3d1a.zip |
[LSan] Print more helpful error message if LSan crashes during leak detection.
llvm-svn: 260717
Diffstat (limited to 'compiler-rt/test')
-rw-r--r-- | compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cc b/compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cc index 8160d5fe56b..2a2010f7ab0 100644 --- a/compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cc +++ b/compiler-rt/test/asan/TestCases/Linux/leak_check_segv.cc @@ -1,5 +1,5 @@ // Test that SIGSEGV during leak checking does not crash the process. -// RUN: %clangxx_asan -O1 %s -o %t && LSAN_OPTIONS="verbosity=1" not %run %t 2>&1 +// RUN: %clangxx_asan -O1 %s -o %t && not %run %t 2>&1 | FileCheck %s // REQUIRES: leak-detection #include <stdlib.h> #include <stdio.h> @@ -11,7 +11,7 @@ char data[10 * 1024 * 1024]; int main() { void *p = malloc(10 * 1024 * 1024); // surprise-surprise! - mprotect((void*)(((unsigned long)p + 4095) & ~4095), 16 * 1024, PROT_NONE); + mprotect((void*)(((unsigned long)p + 4095) & ~4095), 16 * 1024, PROT_NONE); mprotect((void*)(((unsigned long)data + 4095) & ~4095), 16 * 1024, PROT_NONE); __lsan_do_leak_check(); fprintf(stderr, "DONE\n"); @@ -19,5 +19,5 @@ int main() { // CHECK: Tracer caught signal 11 // CHECK: LeakSanitizer has encountered a fatal error +// CHECK: HINT: For debugging, try setting {{.*}} LSAN_OPTIONS // CHECK-NOT: DONE - |