diff options
author | Renato Golin <renato.golin@linaro.org> | 2015-02-22 18:58:18 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2015-02-22 18:58:18 +0000 |
commit | 7b4f643c674b55eb9493398b9a02c2e70ff84cbe (patch) | |
tree | ac985fe86b6c60f1a3f8249a1fb2e6d2b0bfd67b /test/asan/TestCases/contiguous_container_crash.cc | |
parent | 19c7ecf66cb7a15d024f974d2d02c0ed9fa5bfcf (diff) |
Revert "[ASan] Make the argument of '__sanitizer_annotate_contiguous_container' is not aligned error message easier to understand"
This reverts commit r230019, as it was breaking the ARM sanitizer buildbot
and let other errors be introduced since it wasn't fixed/reverted in
time.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@230179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases/contiguous_container_crash.cc')
-rw-r--r-- | test/asan/TestCases/contiguous_container_crash.cc | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/test/asan/TestCases/contiguous_container_crash.cc b/test/asan/TestCases/contiguous_container_crash.cc index 9bea17765..143ae9d8e 100644 --- a/test/asan/TestCases/contiguous_container_crash.cc +++ b/test/asan/TestCases/contiguous_container_crash.cc @@ -1,7 +1,6 @@ // RUN: %clangxx_asan -O %s -o %t // RUN: not %run %t crash 2>&1 | FileCheck --check-prefix=CHECK-CRASH %s -// RUN: not %run %t bad-bounds 2>&1 | FileCheck --check-prefix=CHECK-BAD-BOUNDS %s -// RUN: not %run %t bad-alignment 2>&1 | FileCheck --check-prefix=CHECK-BAD-ALIGNMENT %s +// RUN: not %run %t bad-bounds 2>&1 | FileCheck --check-prefix=CHECK-BAD %s // RUN: env ASAN_OPTIONS=detect_container_overflow=0 %run %t crash // // Test crash due to __sanitizer_annotate_contiguous_container. @@ -22,31 +21,21 @@ int TestCrash() { t[60] = 0; __sanitizer_annotate_contiguous_container(&t[0], &t[0] + 100, &t[0] + 100, &t[0] + 50); -// CHECK-CRASH: AddressSanitizer: container-overflow return (int)t[60 * one]; // Touches the poisoned memory. } void BadBounds() { long t[100]; -// CHECK-BAD-BOUNDS: ERROR: AddressSanitizer: bad parameters to __sanitizer_annotate_contiguous_container __sanitizer_annotate_contiguous_container(&t[0], &t[0] + 100, &t[0] + 101, &t[0] + 50); } -void BadAlignment() { - int t[100]; -// CHECK-BAD-ALIGNMENT: ERROR: AddressSanitizer: bad parameters to __sanitizer_annotate_contiguous_container -// CHECK-BAD-ALIGNMENT: ERROR: beg is not aligned by 8 - __sanitizer_annotate_contiguous_container(&t[1], &t[0] + 100, &t[1] + 10, - &t[0] + 50); -} - int main(int argc, char **argv) { assert(argc == 2); if (!strcmp(argv[1], "crash")) return TestCrash(); else if (!strcmp(argv[1], "bad-bounds")) BadBounds(); - else if (!strcmp(argv[1], "bad-alignment")) - BadAlignment(); } +// CHECK-CRASH: AddressSanitizer: container-overflow +// CHECK-BAD: ERROR: AddressSanitizer: bad parameters to __sanitizer_annotate_contiguous_container |