summaryrefslogtreecommitdiff
path: root/lib/asan/tests/asan_noinst_test.cc
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2014-04-17 14:38:25 +0000
committerKostya Serebryany <kcc@google.com>2014-04-17 14:38:25 +0000
commit97a965ce9c488d02bc1fc92df70e5a500e3f821f (patch)
tree293df235a8d7c7a3168651ee8da9dbc9bc2f388e /lib/asan/tests/asan_noinst_test.cc
parent1e1ecda447b441c2af5a4668623af6a10f8d247d (diff)
[asan] fix a bug in outlined asan checks and in the corresponding test (ouch)
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@206470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/tests/asan_noinst_test.cc')
-rw-r--r--lib/asan/tests/asan_noinst_test.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/asan/tests/asan_noinst_test.cc b/lib/asan/tests/asan_noinst_test.cc
index fe4112d13..ea1dd4aaa 100644
--- a/lib/asan/tests/asan_noinst_test.cc
+++ b/lib/asan/tests/asan_noinst_test.cc
@@ -231,6 +231,7 @@ TEST(AddressSanitizer, LoadStoreCallbacks) {
};
uptr buggy_ptr;
+
__asan_test_only_reported_buggy_pointer = &buggy_ptr;
for (uptr len = 16; len <= 32; len++) {
char *ptr = new char[len];
@@ -240,7 +241,7 @@ TEST(AddressSanitizer, LoadStoreCallbacks) {
uptr size = 1 << size_log;
CB call = cb[is_write][size_log];
// Iterate only size-aligned offsets.
- for (uptr offset = 0; offset < len; offset += size) {
+ for (uptr offset = 0; offset <= len; offset += size) {
buggy_ptr = 0;
call(p + offset);
if (offset + size <= len)