summaryrefslogtreecommitdiff
path: root/lib/asan/tests/asan_oob_test.cc
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2014-05-23 11:52:38 +0000
committerKostya Serebryany <kcc@google.com>2014-05-23 11:52:38 +0000
commit2c328b1f4b243fabbe1cd1433745508e288f37f4 (patch)
tree51c308ee70c12e371291c4208942cfdc0484ea00 /lib/asan/tests/asan_oob_test.cc
parentce9a5a0415df0297c941492a4212ad819bf00467 (diff)
[asan] fix a test following r209508
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@209509 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/tests/asan_oob_test.cc')
-rw-r--r--lib/asan/tests/asan_oob_test.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/asan/tests/asan_oob_test.cc b/lib/asan/tests/asan_oob_test.cc
index f8343f19c..0c6bea285 100644
--- a/lib/asan/tests/asan_oob_test.cc
+++ b/lib/asan/tests/asan_oob_test.cc
@@ -75,7 +75,9 @@ TEST(AddressSanitizer, OOB_int) {
}
TEST(AddressSanitizer, OOBRightTest) {
- for (size_t access_size = 1; access_size <= 8; access_size *= 2) {
+ size_t max_access_size = SANITIZER_WORDSIZE == 64 ? 8 : 4;
+ for (size_t access_size = 1; access_size <= max_access_size;
+ access_size *= 2) {
for (size_t alloc_size = 1; alloc_size <= 8; alloc_size++) {
for (size_t offset = 0; offset <= 8; offset += access_size) {
void *p = malloc(alloc_size);