diff options
| author | Filipe Cabecinhas <me@filcab.net> | 2016-09-09 14:18:22 +0000 |
|---|---|---|
| committer | Filipe Cabecinhas <me@filcab.net> | 2016-09-09 14:18:22 +0000 |
| commit | e3c7f54e9309d33c92d5f8f9e7a7224658518d51 (patch) | |
| tree | b6021f4920a2660bbaa37cf3b7a264160f63fc06 | |
| parent | c59f7c745bc629d8a6ef22aa0c748e9216452851 (diff) | |
| download | bcm5719-llvm-e3c7f54e9309d33c92d5f8f9e7a7224658518d51.tar.gz bcm5719-llvm-e3c7f54e9309d33c92d5f8f9e7a7224658518d51.zip | |
[asan] Since r280945 fixed the OS X abort() problem, merge scariness_score_test.cc and make it a general test.
Summary: Merges back both scariness_score_test.cc files, since the Linux-specific version shouldn't be needed any more.
Reviewers: kcc, eugenis, vitalybuka
Subscribers: llvm-commits, kubabrecka
Differential Revision: https://reviews.llvm.org/D24347
llvm-svn: 281048
| -rw-r--r-- | compiler-rt/test/asan/TestCases/Linux/scariness_score_test.cc | 14 | ||||
| -rw-r--r-- | compiler-rt/test/asan/TestCases/scariness_score_test.cc | 3 |
2 files changed, 3 insertions, 14 deletions
diff --git a/compiler-rt/test/asan/TestCases/Linux/scariness_score_test.cc b/compiler-rt/test/asan/TestCases/Linux/scariness_score_test.cc deleted file mode 100644 index 9cf9e8d653f..00000000000 --- a/compiler-rt/test/asan/TestCases/Linux/scariness_score_test.cc +++ /dev/null @@ -1,14 +0,0 @@ -// Test how we produce the scariness score. -// Linux-specific variant which tests abort() calls. On OS X the process -// disappears before being able to print the scariness. - -// RUN: %clangxx_asan -O0 %s -o %t -// RUN: export %env_asan_opts=detect_stack_use_after_return=1:handle_abort=1:print_scariness=1 -// RUN: not %run %t 2>&1 | FileCheck %s -// REQUIRES: shell -#include <stdlib.h> - -int main(int argc, char **argv) { - abort(); - // CHECK: SCARINESS: 10 (signal) -} diff --git a/compiler-rt/test/asan/TestCases/scariness_score_test.cc b/compiler-rt/test/asan/TestCases/scariness_score_test.cc index 44f25c40b20..dee7a13b7b3 100644 --- a/compiler-rt/test/asan/TestCases/scariness_score_test.cc +++ b/compiler-rt/test/asan/TestCases/scariness_score_test.cc @@ -32,6 +32,7 @@ // RUN: not %run %t 24 2>&1 | FileCheck %s --check-prefix=CHECK24 // RUN: not %run %t 25 2>&1 | FileCheck %s --check-prefix=CHECK25 // RUN: not %run %t 26 2>&1 | FileCheck %s --check-prefix=CHECK26 +// RUN: not %run %t 27 2>&1 | FileCheck %s --check-prefix=CHECK27 // Parts of the test are too platform-specific: // REQUIRES: x86_64-target-arch // REQUIRES: shell @@ -161,6 +162,7 @@ int main(int argc, char **argv) { case 24: free((char*)malloc(100) + 10); break; case 25: memcpy(arr, arr+10, 20); break; case 26: UseAfterPoison(); break; + case 27: abort(); // CHECK1: SCARINESS: 12 (1-byte-read-heap-buffer-overflow) // CHECK2: SCARINESS: 17 (4-byte-read-heap-buffer-overflow) // CHECK3: SCARINESS: 33 (2-byte-write-heap-buffer-overflow) @@ -187,5 +189,6 @@ int main(int argc, char **argv) { // CHECK24: SCARINESS: 40 (bad-free) // CHECK25: SCARINESS: 10 (memcpy-param-overlap) // CHECK26: SCARINESS: 27 (4-byte-read-use-after-poison) + // CHECK27: SCARINESS: 10 (signal) } } |

