summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2017-09-21 00:11:30 +0000
committerVitaly Buka <vitalybuka@google.com>2017-09-21 00:11:30 +0000
commit368e57c46a9d11275d6186653ab59dca2afffa20 (patch)
tree78f248e686eefe7f9524392c77b41ada2ce2fabb /test
parenta70d41b8c9931d3b18ec90bbea8c10912ee587cf (diff)
[asan] Remove "COLLISION" workaround for datarace in asan
"nested bug in the same thread" is not expected in case like this and was caused by https://github.com/google/sanitizers/issues/858 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/asan/TestCases/Posix/halt_on_error-torture.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/test/asan/TestCases/Posix/halt_on_error-torture.cc b/test/asan/TestCases/Posix/halt_on_error-torture.cc
index 220bbff85..10a6dfcd4 100644
--- a/test/asan/TestCases/Posix/halt_on_error-torture.cc
+++ b/test/asan/TestCases/Posix/halt_on_error-torture.cc
@@ -3,17 +3,16 @@
// RUN: %clangxx_asan -fsanitize-recover=address -pthread %s -o %t
//
// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false %run %t 1 10 >%t.log 2>&1
-// RUN: FileCheck %s <%t.log
// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' %t.log | count 10
-// RUN: FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
+// RUN: FileCheck %s <%t.log
//
-// Collisions are unlikely but still possible so we need the ||.
-// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
-// RUN: FileCheck --check-prefix=CHECK-COLLISION %s <%t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
+// RUN: %env_asan_opts=halt_on_error=false:suppress_equal_pcs=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
+// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' %t.log | count 200
+// RUN: FileCheck %s <%t.log
//
-// Collisions are unlikely but still possible so we need the ||.
-// RUN: %env_asan_opts=halt_on_error=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
-// RUN: FileCheck --check-prefix=CHECK-COLLISION %s <%t.log || FileCheck --check-prefix=CHECK-NO-COLLISION %s <%t.log
+// RUN: %env_asan_opts=halt_on_error=false:exitcode=0 %run %t 10 20 >%t.log 2>&1
+// RUN: grep 'ERROR: AddressSanitizer: use-after-poison' %t.log | count 1
+// RUN: FileCheck %s <%t.log
#include <stdio.h>
#include <stdlib.h>
@@ -39,7 +38,6 @@ void *run(void *arg) {
for (size_t i = 0; i < niter; ++i) {
random_delay(&seed);
- // Expect error collisions here
// CHECK: ERROR: AddressSanitizer: use-after-poison
volatile int idx = 0;
tmp[idx] = 0;
@@ -73,8 +71,7 @@ int main(int argc, char **argv) {
}
}
- // CHECK-COLLISION: AddressSanitizer: nested bug in the same thread, aborting
- // CHECK-NO-COLLISION: All threads terminated
+ // CHECK: All threads terminated
printf("All threads terminated\n");
delete [] tids;