diff --git a/compiler-rt/lib/asan/asan_allocator.cpp b/compiler-rt/lib/asan/asan_allocator.cpp --- a/compiler-rt/lib/asan/asan_allocator.cpp +++ b/compiler-rt/lib/asan/asan_allocator.cpp @@ -803,8 +803,8 @@ sptr offset = 0; if (!m1 || AsanChunkView(m1).AddrIsAtLeft(addr, 1, &offset)) { // The address is in the chunk's left redzone, so maybe it is actually - // a right buffer overflow from the other chunk to the left. - // Search a bit to the left to see if there is another chunk. + // a right buffer overflow from the other chunk before. + // Search a bit before to see if there is another chunk. AsanChunk *m2 = nullptr; for (uptr l = 1; l < GetPageSizeCached(); l++) { m2 = GetAsanChunkByAddr(addr - l); diff --git a/compiler-rt/lib/asan/asan_descriptions.cpp b/compiler-rt/lib/asan/asan_descriptions.cpp --- a/compiler-rt/lib/asan/asan_descriptions.cpp +++ b/compiler-rt/lib/asan/asan_descriptions.cpp @@ -129,11 +129,11 @@ str.append("%s", d.Location()); switch (descr.access_type) { case kAccessTypeLeft: - str.append("%p is located %zd bytes to the left of", + str.append("%p is located %zd bytes before", (void *)descr.bad_addr, descr.offset); break; case kAccessTypeRight: - str.append("%p is located %zd bytes to the right of", + str.append("%p is located %zd bytes after", (void *)descr.bad_addr, descr.offset); break; case kAccessTypeInside: @@ -279,17 +279,17 @@ Decorator d; str.append("%s", d.Location()); if (addr < g.beg) { - str.append("%p is located %zd bytes to the left", (void *)addr, + str.append("%p is located %zd bytes before", (void *)addr, g.beg - addr); } else if (addr + access_size > g.beg + g.size) { if (addr < g.beg + g.size) addr = g.beg + g.size; - str.append("%p is located %zd bytes to the right", (void *)addr, + str.append("%p is located %zd bytes after", (void *)addr, addr - (g.beg + g.size)); } else { // Can it happen? - str.append("%p is located %zd bytes inside", (void *)addr, addr - g.beg); + str.append("%p is located %zd bytes inside of", (void *)addr, addr - g.beg); } - str.append(" of global variable '%s' defined in '", + str.append(" global variable '%s' defined in '", MaybeDemangleGlobalName(g.name)); PrintGlobalLocation(&str, g); str.append("' (0x%zx) of size %zu\n", g.beg, g.size); diff --git a/compiler-rt/lib/asan/tests/asan_mem_test.cpp b/compiler-rt/lib/asan/tests/asan_mem_test.cpp --- a/compiler-rt/lib/asan/tests/asan_mem_test.cpp +++ b/compiler-rt/lib/asan/tests/asan_mem_test.cpp @@ -37,18 +37,18 @@ MEMSET(array + length, 0, zero); MEMSET(array + length + 1, 0, zero); - // try to memset bytes to the right of array + // try to memset bytes after array EXPECT_DEATH(MEMSET(array, 0, size + 1), RightOOBWriteMessage(0)); EXPECT_DEATH(MEMSET((char*)(array + length) - 1, element, 6), RightOOBWriteMessage(0)); EXPECT_DEATH(MEMSET(array + 1, element, size + sizeof(T)), RightOOBWriteMessage(0)); - // whole interval is to the right + // whole interval is after EXPECT_DEATH(MEMSET(array + length + 1, 0, 10), RightOOBWriteMessage(sizeof(T))); - // try to memset bytes to the left of array + // try to memset bytes before array EXPECT_DEATH(MEMSET((char*)array - 1, element, size), LeftOOBWriteMessage(1)); EXPECT_DEATH(MEMSET((char*)array - 5, 0, 6), @@ -58,11 +58,11 @@ EXPECT_DEATH(memset(array - 5, element, size + 5 * sizeof(T)), LeftOOBWriteMessage(5 * sizeof(T))); } - // whole interval is to the left + // whole interval is before EXPECT_DEATH(MEMSET(array - 2, 0, sizeof(T)), LeftOOBWriteMessage(2 * sizeof(T))); - // try to memset bytes both to the left & to the right + // try to memset bytes both before & after EXPECT_DEATH(MEMSET((char*)array - 2, element, size + 4), LeftOOBWriteMessage(2)); @@ -114,7 +114,7 @@ // fprintf(stderr, " large oob memset: %p %p %zd\n", x1, x2, size); // Do a memset on x1 with huge out-of-bound access that will end up in x2. EXPECT_DEATH(Ident(memset)(x1, 0, size * 2), - "is located 0 bytes to the right"); + "is located 0 bytes after"); delete [] x1; delete [] x2; return; @@ -143,25 +143,25 @@ M::transfer(dest, src - 1, zero); M::transfer(dest, src, zero); - // try to change mem to the right of dest + // try to change mem after dest EXPECT_DEATH(M::transfer(dest + 1, src, size), RightOOBWriteMessage(0)); EXPECT_DEATH(M::transfer((char*)(dest + length) - 1, src, 5), RightOOBWriteMessage(0)); - // try to change mem to the left of dest + // try to change mem before dest EXPECT_DEATH(M::transfer(dest - 2, src, size), LeftOOBWriteMessage(2 * sizeof(T))); EXPECT_DEATH(M::transfer((char*)dest - 3, src, 4), LeftOOBWriteMessage(3)); - // try to access mem to the right of src + // try to access mem after src EXPECT_DEATH(M::transfer(dest, src + 2, size), RightOOBReadMessage(0)); EXPECT_DEATH(M::transfer(dest, (char*)(src + length) - 3, 6), RightOOBReadMessage(0)); - // try to access mem to the left of src + // try to access mem before src EXPECT_DEATH(M::transfer(dest, src - 1, size), LeftOOBReadMessage(sizeof(T))); EXPECT_DEATH(M::transfer(dest, (char*)src - 6, 7), diff --git a/compiler-rt/lib/asan/tests/asan_oob_test.cpp b/compiler-rt/lib/asan/tests/asan_oob_test.cpp --- a/compiler-rt/lib/asan/tests/asan_oob_test.cpp +++ b/compiler-rt/lib/asan/tests/asan_oob_test.cpp @@ -30,7 +30,7 @@ static std::string GetLeftOOBMessage(int off) { char str[100]; - sprintf(str, "is located.*%d byte.*to the left", off); + sprintf(str, "is located.*%d byte.*before", off); return str; } @@ -38,12 +38,12 @@ char str[100]; #if !defined(_WIN32) // FIXME: Fix PR42868 and remove SEGV match. - sprintf(str, "is located.*%d byte.*to the right|SEGV", off); + sprintf(str, "is located.*%d byte.*after|SEGV", off); #else // `|` doesn't work in googletest's regexes on Windows, // see googletest/docs/advanced.md#regular-expression-syntax // But it's not needed on Windows anyways. - sprintf(str, "is located.*%d byte.*to the right", off); + sprintf(str, "is located.*%d byte.*after", off); #endif return str; } diff --git a/compiler-rt/lib/asan/tests/asan_str_test.cpp b/compiler-rt/lib/asan/tests/asan_str_test.cpp --- a/compiler-rt/lib/asan/tests/asan_str_test.cpp +++ b/compiler-rt/lib/asan/tests/asan_str_test.cpp @@ -51,7 +51,7 @@ } // namespace // Input to a test is a zero-terminated string str with given length -// Accesses to the bytes to the left and to the right of str +// Accesses to the bytes before and after str // are presumed to produce OOB errors void StrLenOOBTestTemplate(char *str, size_t length, OOBKind oob_kind) { // Normal strlen calls @@ -62,7 +62,7 @@ } // Arg of strlen is not malloced, OOB access if (oob_kind != OOBKind::Global) { - // We don't insert RedZones to the left of global variables + // We don't insert RedZones before global variables EXPECT_DEATH(Ident(strlen(str - 1)), LeftOOBReadMessage(oob_kind, 1)); EXPECT_DEATH(Ident(strlen(str - 5)), LeftOOBReadMessage(oob_kind, 5)); } diff --git a/compiler-rt/lib/asan/tests/asan_test.cpp b/compiler-rt/lib/asan/tests/asan_test.cpp --- a/compiler-rt/lib/asan/tests/asan_test.cpp +++ b/compiler-rt/lib/asan/tests/asan_test.cpp @@ -313,7 +313,7 @@ static void TestLargeMalloc(size_t size) { char buff[1024]; - sprintf(buff, "is located 1 bytes to the left of %lu-byte", (long)size); + sprintf(buff, "is located 1 bytes before %lu-byte", (long)size); EXPECT_DEATH(Ident((char*)malloc(size))[-1] = 0, buff); } @@ -329,7 +329,7 @@ if (SANITIZER_WORDSIZE != 64 || ASAN_AVOID_EXPENSIVE_TESTS) return; size_t n_megs = 4100; EXPECT_DEATH(Ident((char*)malloc(n_megs << 20))[-1] = 0, - "is located 1 bytes to the left|" + "is located 1 bytes before|" "AddressSanitizer failed to allocate"); } #endif @@ -345,9 +345,9 @@ for (int align = 16; align <= (1 << 23); align *= 2) { size_t size = align * 5; EXPECT_DEATH(MemalignRun(align, size, -1), - "is located 1 bytes to the left"); + "is located 1 bytes before"); EXPECT_DEATH(MemalignRun(align, size, size + 1), - "is located 1 bytes to the right"); + "is located 1 bytes after"); } } #endif // SANITIZER_TEST_HAS_MEMALIGN @@ -734,7 +734,7 @@ EXPECT_DEATH(_mm_store_si128((__m128i*)p, value_wide), "WRITE of size 16"); EXPECT_DEATH(_mm_store_si128((__m128i*)p, value_wide), - "located 0 bytes to the right of 12-byte"); + "located 0 bytes after 12-byte"); free(a); } #endif @@ -747,7 +747,7 @@ #if !GTEST_USES_SIMPLE_RE "buffer-overflow.*%s.*" #endif - "located %d bytes to the right", + "located %d bytes after", #if !GTEST_USES_SIMPLE_RE is_write ? "WRITE" : "READ", #endif @@ -771,7 +771,7 @@ #if !GTEST_USES_SIMPLE_RE ASAN_PCRE_DOTALL "%s.*" #endif - "located %d bytes to the left", + "located %d bytes before", #if !GTEST_USES_SIMPLE_RE is_write ? "WRITE" : "READ", #endif @@ -790,7 +790,7 @@ std::string LeftOOBAccessMessage(int oob_distance) { assert(oob_distance > 0); char expected_str[100]; - sprintf(expected_str, "located %d bytes to the left", oob_distance); + sprintf(expected_str, "located %d bytes before", oob_distance); return std::string(expected_str); } @@ -812,7 +812,7 @@ EXPECT_DEATH(READ_N_BYTES, \ ASAN_PCRE_DOTALL \ "AddressSanitizer: heap-buffer-overflow" \ - ".* is located 0 bytes to the right of 10-byte region"); \ + ".* is located 0 bytes after 10-byte region"); \ close(fd); \ delete [] x; \ @@ -1013,23 +1013,23 @@ glob5[Ident(4)] = 0; EXPECT_DEATH(glob5[Ident(5)] = 0, - "0 bytes to the right of global variable.*glob5.* size 5"); + "0 bytes after global variable.*glob5.* size 5"); EXPECT_DEATH(glob5[Ident(5+6)] = 0, - "6 bytes to the right of global variable.*glob5.* size 5"); + "6 bytes after global variable.*glob5.* size 5"); Ident(static110); // avoid optimizations static110[Ident(0)] = 0; static110[Ident(109)] = 0; EXPECT_DEATH(static110[Ident(110)] = 0, - "0 bytes to the right of global variable"); + "0 bytes after global variable"); EXPECT_DEATH(static110[Ident(110+7)] = 0, - "7 bytes to the right of global variable"); + "7 bytes after global variable"); Ident(func_static15); // avoid optimizations func_static15[Ident(0)] = 0; EXPECT_DEATH(func_static15[Ident(15)] = 0, - "0 bytes to the right of global variable"); + "0 bytes after global variable"); EXPECT_DEATH(func_static15[Ident(15 + 9)] = 0, - "9 bytes to the right of global variable"); + "9 bytes after global variable"); Ident(fs1); Ident(fs2); @@ -1037,12 +1037,12 @@ // We don't create left redzones, so this is not 100% guaranteed to fail. // But most likely will. - EXPECT_DEATH(fs2[Ident(-1)] = 0, "is located.*of global variable"); + EXPECT_DEATH(fs2[Ident(-1)] = 0, "is located.* global variable"); EXPECT_DEATH(Ident(Ident(ConstGlob)[8]), - "is located 1 bytes to the right of .*ConstGlob"); + "is located 1 bytes after .*ConstGlob"); EXPECT_DEATH(Ident(Ident(StaticConstGlob)[5]), - "is located 2 bytes to the right of .*StaticConstGlob"); + "is located 2 bytes after .*StaticConstGlob"); // call stuff from another file. GlobalsTest(0); diff --git a/compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm b/compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm --- a/compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm +++ b/compiler-rt/test/asan/TestCases/Darwin/address-range-limit.mm @@ -38,4 +38,4 @@ // CHECK: AddressSanitizer: heap-buffer-overflow // CHECK: WRITE of size 1 // CHECK: {{#0 .* in main}} -// CHECK: is located 0 bytes to the right of 10-byte region +// CHECK: is located 0 bytes after 10-byte region diff --git a/compiler-rt/test/asan/TestCases/Darwin/dead-strip.c b/compiler-rt/test/asan/TestCases/Darwin/dead-strip.c --- a/compiler-rt/test/asan/TestCases/Darwin/dead-strip.c +++ b/compiler-rt/test/asan/TestCases/Darwin/dead-strip.c @@ -18,6 +18,6 @@ int main(int argc, char *argv[]) { alive[argc] = 0; - // ASAN-CHECK: {{0x.* is located 0 bytes to the right of global variable}} + // ASAN-CHECK: {{0x.* is located 0 bytes after global variable}} return 0; } diff --git a/compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cpp b/compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cpp --- a/compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cpp +++ b/compiler-rt/test/asan/TestCases/Darwin/haswell-symbolication.cpp @@ -86,7 +86,7 @@ // CHECK: AddressSanitizer: global-buffer-overflow // CHECK-LI: #0 0x{{.*}} in faulty_func{{.*}} {{.*}}haswell-symbolication.cpp:[[@LINE-2]] // CHECK-NOLI: #0 0x{{.*}} in faulty_func{{.*}} {{.*}}haswell-symbolication - // CHECK: is located 2 bytes to the right of global variable 'faulty_global' + // CHECK: is located 2 bytes after global variable 'faulty_global' // CHECK-NOT: LLVMSymbolizer: error reading file } diff --git a/compiler-rt/test/asan/TestCases/Linux/global-overflow-bfd.cpp b/compiler-rt/test/asan/TestCases/Linux/global-overflow-bfd.cpp --- a/compiler-rt/test/asan/TestCases/Linux/global-overflow-bfd.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/global-overflow-bfd.cpp @@ -12,7 +12,7 @@ memset(ZZZ, 0, 10); int res = YYY[argc * 10]; // BOOOM // CHECK: {{READ of size 1 at}} - // CHECK: {{located 0 bytes to the right of global variable}} + // CHECK: {{located 0 bytes after global variable}} res += XXX[argc] + ZZZ[argc]; return res; } diff --git a/compiler-rt/test/asan/TestCases/Linux/global-overflow-lld.cpp b/compiler-rt/test/asan/TestCases/Linux/global-overflow-lld.cpp --- a/compiler-rt/test/asan/TestCases/Linux/global-overflow-lld.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/global-overflow-lld.cpp @@ -13,7 +13,7 @@ memset(ZZZ, 0, 10); int res = YYY[argc * 10]; // BOOOM // CHECK: {{READ of size 1 at}} - // CHECK: {{located 0 bytes to the right of global variable}} + // CHECK: {{located 0 bytes after global variable}} res += XXX[argc] + ZZZ[argc]; return res; } diff --git a/compiler-rt/test/asan/TestCases/Linux/malloc-in-qsort.cpp b/compiler-rt/test/asan/TestCases/Linux/malloc-in-qsort.cpp --- a/compiler-rt/test/asan/TestCases/Linux/malloc-in-qsort.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/malloc-in-qsort.cpp @@ -41,12 +41,12 @@ // Fast unwind may not unwind through qsort. // CHECK-FAST: ERROR: AddressSanitizer: heap-buffer-overflow -// CHECK-FAST: is located 0 bytes to the right +// CHECK-FAST: is located 0 bytes after // CHECK-FAST: #0{{.*}}operator new // CHECK-FAST-NEXT: #1{{.*}}QsortCallback // CHECK-SLOW: ERROR: AddressSanitizer: heap-buffer-overflow -// CHECK-SLOW: is located 0 bytes to the right +// CHECK-SLOW: is located 0 bytes after // CHECK-SLOW: #0{{.*}}operator new // CHECK-SLOW-NEXT: #1{{.*}}QsortCallback // CHECK-SLOW: #{{.*}}MyQsort diff --git a/compiler-rt/test/asan/TestCases/Linux/overflow-in-qsort.cpp b/compiler-rt/test/asan/TestCases/Linux/overflow-in-qsort.cpp --- a/compiler-rt/test/asan/TestCases/Linux/overflow-in-qsort.cpp +++ b/compiler-rt/test/asan/TestCases/Linux/overflow-in-qsort.cpp @@ -40,10 +40,10 @@ // Fast unwind may not unwind through qsort. // CHECK-FAST: ERROR: AddressSanitizer: global-buffer-overflow // CHECK-FAST: #0{{.*}} in QsortCallback -// CHECK-FAST: is located 0 bytes to the right of global variable 'global_array +// CHECK-FAST: is located 0 bytes after global variable 'global_array // CHECK-SLOW: ERROR: AddressSanitizer: global-buffer-overflow // CHECK-SLOW: #0{{.*}} in QsortCallback // CHECK-SLOW: #{{.*}} in MyQsort // CHECK-SLOW: #{{.*}} in main -// CHECK-SLOW: is located 0 bytes to the right of global variable 'global_array +// CHECK-SLOW: is located 0 bytes after global variable 'global_array diff --git a/compiler-rt/test/asan/TestCases/PR52382.c b/compiler-rt/test/asan/TestCases/PR52382.c --- a/compiler-rt/test/asan/TestCases/PR52382.c +++ b/compiler-rt/test/asan/TestCases/PR52382.c @@ -9,4 +9,4 @@ int main(void) { return global_array[103]; } // CHECK: AddressSanitizer: global-buffer-overflow on address -// CHECK: is located 12 bytes to the right of global variable 'global_array' +// CHECK: is located 12 bytes after global variable 'global_array' diff --git a/compiler-rt/test/asan/TestCases/Posix/start-deactivated.cpp b/compiler-rt/test/asan/TestCases/Posix/start-deactivated.cpp --- a/compiler-rt/test/asan/TestCases/Posix/start-deactivated.cpp +++ b/compiler-rt/test/asan/TestCases/Posix/start-deactivated.cpp @@ -115,7 +115,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow // CHECK: READ of size 1 // CHECK: {{#0 .* in do_another_bad_thing}} - // CHECK: is located 5 bytes to the right of 100-byte region + // CHECK: is located 5 bytes after 100-byte region // CHECK: in do_another_bad_thing return 0; diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_left_oob.cpp @@ -9,7 +9,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 4 at [[ADDR]] thread T0 // CHECK-NEXT: {{#0 .* main .*calloc_left_oob.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 4 bytes to the left of 168-byte region +// CHECK: [[ADDR]] is located 4 bytes before 168-byte region // CHECK: allocated by thread T0 here: // CHECK-NEXT: {{#0 .* calloc }} // CHECK-NEXT: {{#1 .* main .*calloc_left_oob.cpp}}:[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/calloc_right_oob.cpp @@ -9,7 +9,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 4 at [[ADDR]] thread T0 // CHECK-NEXT: {{#0 .* main .*calloc_right_oob.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 0 bytes to the right of 168-byte region +// CHECK: [[ADDR]] is located 0 bytes after 168-byte region // CHECK: allocated by thread T0 here: // CHECK-NEXT: {{#0 .* calloc }} // CHECK-NEXT: {{#1 .* main .*calloc_right_oob.cpp}}:[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/dll_malloc_left_oob.cpp @@ -12,7 +12,7 @@ // CHECK-NEXT: test_function {{.*}}dll_malloc_left_oob.cpp:[[@LINE-3]] // CHECK-NEXT: main {{.*}}dll_host.cpp // -// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region +// CHECK: [[ADDR]] is located 1 bytes before 42-byte region // CHECK-LABEL: allocated by thread T0 here: // CHECK-NEXT: malloc // CHECK-NEXT: test_function {{.*}}dll_malloc_left_oob.cpp:[[@LINE-10]] diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_left_oob.cpp @@ -11,7 +11,7 @@ // CHECK-NEXT: test_function {{.*}}dll_operator_array_new_left_oob.cpp:[[@LINE-3]] // CHECK-NEXT: main {{.*}}dll_host.cpp // -// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region +// CHECK: [[ADDR]] is located 1 bytes before 42-byte region // CHECK-LABEL: allocated by thread T0 here: // FIXME: Should get rid of the malloc/free frames called from the inside of // operator new/delete in DLLs when using -MT CRT. diff --git a/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/dll_operator_array_new_with_dtor_left_oob.cpp @@ -21,7 +21,7 @@ // FIXME: Currently it says "4 bytes ... left of 172-byte region", // should be "8 bytes ... left of 168-byte region", see // https://code.google.com/p/address-sanitizer/issues/detail?id=314 -// CHECK: [[ADDR]] is located {{.*}} bytes to the left of {{(172|176)}}-byte region +// CHECK: [[ADDR]] is located {{.*}} bytes before {{(172|176)}}-byte region // FIXME: Should get rid of the malloc/free frames called from the inside of // operator new/delete in DLLs when using -MT CRT. // FIXME: The operator new frame should have []. diff --git a/compiler-rt/test/asan/TestCases/Windows/fuse-lld-globals.cpp b/compiler-rt/test/asan/TestCases/Windows/fuse-lld-globals.cpp --- a/compiler-rt/test/asan/TestCases/Windows/fuse-lld-globals.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/fuse-lld-globals.cpp @@ -11,7 +11,7 @@ int res = YYY[argc * 10]; // BOOOM // CHECK: {{READ of size 1 at 0x.* thread T0}} // CHECK: {{ #0 0x.* in main .*fuse-lld-globals.cpp:}}[[@LINE-2]] - // CHECK: {{0x.* is located 0 bytes to the right of global variable}} + // CHECK: {{0x.* is located 0 bytes after global variable}} // CHECK: {{.*YYY.* of size 10}} res += XXX[argc] + ZZZ[argc]; return res; diff --git a/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/global_const_string_oob.cpp @@ -13,7 +13,7 @@ // CHECK: AddressSanitizer: global-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: READ of size 1 at [[ADDR]] thread T0 // CHECK-NEXT: {{#0 .* main .*global_const_string_oob.cpp:}}[[@LINE-5]] - // CHECK: [[ADDR]] is located 5 bytes to the right of global variable [[STR:.*]] defined in {{'.*global_const_string_oob.cpp' .*}} of size 11 + // CHECK: [[ADDR]] is located 5 bytes after global variable [[STR:.*]] defined in {{'.*global_const_string_oob.cpp' .*}} of size 11 // CHECK: [[STR]] is ascii string 'foobarspam' return 0; } diff --git a/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp b/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp --- a/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/intercept_strdup.cpp @@ -18,7 +18,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK: {{#0 .* main .*}}intercept_strdup.cpp:[[@LINE-3]] -// CHECK: [[ADDR]] is located 1 bytes to the left of 6-byte region +// CHECK: [[ADDR]] is located 1 bytes before 6-byte region // CHECK: allocated by thread T0 here: // // The first frame is our wrapper normally but will be malloc in the dynamic diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_left_oob.cpp @@ -9,7 +9,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK-NEXT: {{#0 .* main .*malloc_left_oob.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region +// CHECK: [[ADDR]] is located 1 bytes before 42-byte region // CHECK: allocated by thread T0 here: // CHECK-NEXT: {{#0 .* malloc }} // CHECK-NEXT: {{#1 .* main .*malloc_left_oob.cpp}}:[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/malloc_right_oob.cpp @@ -9,7 +9,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK-NEXT: {{#0 .* main .*malloc_right_oob.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region +// CHECK: [[ADDR]] is located 0 bytes after 42-byte region // CHECK: allocated by thread T0 here: // CHECK-NEXT: {{#0 .* malloc }} // CHECK-NEXT: {{#1 .* main .*malloc_right_oob.cpp}}:[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_left_oob.cpp @@ -8,7 +8,7 @@ // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK-NEXT: {{#0 .* main .*operator_array_new_left_oob.cpp}}:[[@LINE-3]] // -// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region +// CHECK: [[ADDR]] is located 1 bytes before 42-byte region // CHECK-LABEL: allocated by thread T0 here: // FIXME: The 'operator new' frame should have []. // CHECK-NEXT: {{#0 .* operator new}} diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_right_oob.cpp @@ -9,7 +9,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK: {{#0 .* main .*operator_array_new_right_oob.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region +// CHECK: [[ADDR]] is located 0 bytes after 42-byte region // CHECK: allocated by thread T0 here: // FIXME: The 'operator new' frame should have []. // CHECK: {{#0 .* operator new}} diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_array_new_with_dtor_left_oob.cpp @@ -18,7 +18,7 @@ // FIXME: Currently it says "4 bytes ... left of 172-byte region", // should be "8 bytes ... left of 168-byte region", see // https://code.google.com/p/address-sanitizer/issues/detail?id=314 -// CHECK: [[ADDR]] is located {{.*}} bytes to the left of {{(172|176)}}-byte region +// CHECK: [[ADDR]] is located {{.*}} bytes before {{(172|176)}}-byte region // CHECK-LABEL: allocated by thread T0 here: // FIXME: The 'operator new' frame should have []. // CHECK-NEXT: {{#0 .* operator new}} diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_left_oob.cpp @@ -9,7 +9,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK: {{#0 .* main .*operator_new_left_oob.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 1 bytes to the left of 1-byte region +// CHECK: [[ADDR]] is located 1 bytes before 1-byte region // CHECK: allocated by thread T0 here: // CHECK: {{#0 .* operator new}} // CHECK: {{#1 .* main .*operator_new_left_oob.cpp}}:[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/operator_new_right_oob.cpp @@ -9,7 +9,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK: {{#0 .* main .*operator_new_right_oob.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 0 bytes to the right of 1-byte region +// CHECK: [[ADDR]] is located 0 bytes after 1-byte region // CHECK: allocated by thread T0 here: // CHECK: {{#0 .* operator new}} // CHECK: {{#1 .* main .*operator_new_right_oob.cpp}}:[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_left_oob.cpp @@ -9,7 +9,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK-NEXT: {{#0 .* main .*realloc_left_oob.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region +// CHECK: [[ADDR]] is located 1 bytes before 42-byte region // CHECK: allocated by thread T0 here: // CHECK-NEXT: {{#0 .* realloc }} // CHECK-NEXT: {{#1 .* main .*realloc_left_oob.cpp}}:[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp b/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp --- a/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/realloc_right_oob.cpp @@ -9,7 +9,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK-NEXT: {{#0 .* main .*realloc_right_oob.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 0 bytes to the right of 42-byte region +// CHECK: [[ADDR]] is located 0 bytes after 42-byte region // CHECK: allocated by thread T0 here: // CHECK-NEXT: {{#0 .* realloc }} // CHECK-NEXT: {{#1 .* main .*realloc_right_oob.cpp}}:[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/Windows/symbols_path.cpp b/compiler-rt/test/asan/TestCases/Windows/symbols_path.cpp --- a/compiler-rt/test/asan/TestCases/Windows/symbols_path.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/symbols_path.cpp @@ -14,7 +14,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 1 at [[ADDR]] thread T0 // CHECK-NEXT: {{#0 .* main .*symbols_path.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 1 bytes to the left of 42-byte region +// CHECK: [[ADDR]] is located 1 bytes before 42-byte region // CHECK: allocated by thread T0 here: // CHECK-NEXT: {{#0 .* malloc}} // CHECK-NEXT: {{#1 .* main .*symbols_path.cpp}}:[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp --- a/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp +++ b/compiler-rt/test/asan/TestCases/Windows/wrong_downcast_on_heap.cpp @@ -18,7 +18,7 @@ // CHECK: AddressSanitizer: heap-buffer-overflow on address [[ADDR:0x[0-9a-f]+]] // CHECK: WRITE of size 4 at [[ADDR]] thread T0 // CHECK: {{#0 0x[0-9a-f]* in main .*wrong_downcast_on_heap.cpp}}:[[@LINE-3]] -// CHECK: [[ADDR]] is located 0 bytes to the right of 4-byte region +// CHECK: [[ADDR]] is located 0 bytes after 4-byte region // CHECK: allocated by thread T0 here: // CHECK: #0 {{.*}} operator new return 0; diff --git a/compiler-rt/test/asan/TestCases/global-demangle.cpp b/compiler-rt/test/asan/TestCases/global-demangle.cpp --- a/compiler-rt/test/asan/TestCases/global-demangle.cpp +++ b/compiler-rt/test/asan/TestCases/global-demangle.cpp @@ -11,7 +11,7 @@ int main(int argc, char **argv) { return (int)XXX::YYY::ZZZ[argc + 5]; // BOOM // CHECK: {{READ of size 1 at 0x.*}} - // CHECK: {{0x.* is located 2 bytes to the right of global variable}} + // CHECK: {{0x.* is located 2 bytes after global variable}} // CHECK: '{{.*}}XXX::YYY::ZZZ{{.*}}' {{.*}} of size 4 // CHECK: '{{.*}}XXX::YYY::ZZZ{{.*}}' is ascii string 'abc' } diff --git a/compiler-rt/test/asan/TestCases/global-location-nodebug.cpp b/compiler-rt/test/asan/TestCases/global-location-nodebug.cpp --- a/compiler-rt/test/asan/TestCases/global-location-nodebug.cpp +++ b/compiler-rt/test/asan/TestCases/global-location-nodebug.cpp @@ -15,8 +15,8 @@ // UNSUPPORTED: windows // CHECK: AddressSanitizer: global-buffer-overflow -// CLASS_STATIC-NO-G: 0x{{.*}} is located 4 bytes to the right of global variable '{{.*}}C::array{{.*}}' defined in '{{.*}}global-location.cpp' {{.*}} of size 40 -// GLOB-NO-G: 0x{{.*}} is located 4 bytes to the right of global variable '{{.*}}global{{.*}}' defined in '{{.*}}global-location.cpp' {{.*}} of size 40 -// FUNC_STATIC-NO-G: 0x{{.*}} is located 4 bytes to the right of global variable '{{.*}}main::array{{.*}}' defined in '{{.*}}global-location.cpp' {{.*}} of size 40 -// LITERAL-NO-G: 0x{{.*}} is located 0 bytes to the right of global variable {{.*}} defined in '{{.*}}global-location.cpp' {{.*}} of size 11 +// CLASS_STATIC-NO-G: 0x{{.*}} is located 4 bytes after global variable '{{.*}}C::array{{.*}}' defined in '{{.*}}global-location.cpp' {{.*}} of size 40 +// GLOB-NO-G: 0x{{.*}} is located 4 bytes after global variable '{{.*}}global{{.*}}' defined in '{{.*}}global-location.cpp' {{.*}} of size 40 +// FUNC_STATIC-NO-G: 0x{{.*}} is located 4 bytes after global variable '{{.*}}main::array{{.*}}' defined in '{{.*}}global-location.cpp' {{.*}} of size 40 +// LITERAL-NO-G: 0x{{.*}} is located 0 bytes after global variable {{.*}} defined in '{{.*}}global-location.cpp' {{.*}} of size 11 // CHECK: SUMMARY: AddressSanitizer: global-buffer-overflow diff --git a/compiler-rt/test/asan/TestCases/global-location.cpp b/compiler-rt/test/asan/TestCases/global-location.cpp --- a/compiler-rt/test/asan/TestCases/global-location.cpp +++ b/compiler-rt/test/asan/TestCases/global-location.cpp @@ -16,11 +16,11 @@ struct C { static int array[10]; - // CLASS_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'C::array' defined in '{{.*}}global-location.cpp:[[@LINE-1]]' {{.*}} of size 40 + // CLASS_STATIC: 0x{{.*}} is located 4 bytes after global variable 'C::array' defined in '{{.*}}global-location.cpp:[[@LINE-1]]' {{.*}} of size 40 }; int global[10]; -// GLOB: 0x{{.*}} is located 4 bytes to the right of global variable 'global' defined in '{{.*}}global-location.cpp:[[@LINE-1]]' {{.*}} of size 40 +// GLOB: 0x{{.*}} is located 4 bytes after global variable 'global' defined in '{{.*}}global-location.cpp:[[@LINE-1]]' {{.*}} of size 40 int C::array[10]; int main(int argc, char **argv) { @@ -30,12 +30,12 @@ case 'c': return C::array[one * 11]; case 'f': static int array[10]; - // FUNC_STATIC: 0x{{.*}} is located 4 bytes to the right of global variable 'main::array' defined in '{{.*}}global-location.cpp:[[@LINE-1]]' {{.*}} of size 40 + // FUNC_STATIC: 0x{{.*}} is located 4 bytes after global variable 'main::array' defined in '{{.*}}global-location.cpp:[[@LINE-1]]' {{.*}} of size 40 memset(array, 0, 10); return array[one * 11]; case 'l': const char *str = "0123456789"; - // LITERAL: 0x{{.*}} is located 0 bytes to the right of global variable {{.*}} defined in '{{.*}}global-location.cpp:[[@LINE-1]]' {{.*}} of size 11 + // LITERAL: 0x{{.*}} is located 0 bytes after global variable {{.*}} defined in '{{.*}}global-location.cpp:[[@LINE-1]]' {{.*}} of size 11 return str[one * 11]; } return 0; diff --git a/compiler-rt/test/asan/TestCases/global-overflow.cpp b/compiler-rt/test/asan/TestCases/global-overflow.cpp --- a/compiler-rt/test/asan/TestCases/global-overflow.cpp +++ b/compiler-rt/test/asan/TestCases/global-overflow.cpp @@ -14,7 +14,7 @@ int res = YYY[argc * 10]; // BOOOM // CHECK: {{READ of size 1 at 0x.* thread T0}} // CHECK: {{ #0 0x.* in main .*global-overflow.cpp:}}[[@LINE-2]] - // CHECK: {{0x.* is located 0 bytes to the right of global variable}} + // CHECK: {{0x.* is located 0 bytes after global variable}} // CHECK: {{.*YYY.* of size 10}} res += XXX[argc] + ZZZ[argc]; return res; diff --git a/compiler-rt/test/asan/TestCases/global-underflow.cpp b/compiler-rt/test/asan/TestCases/global-underflow.cpp --- a/compiler-rt/test/asan/TestCases/global-underflow.cpp +++ b/compiler-rt/test/asan/TestCases/global-underflow.cpp @@ -10,7 +10,7 @@ memset(XXX, 0, 2*sizeof(int)); // CHECK: {{READ of size 4 at 0x.* thread T0}} // CHECK: {{ #0 0x.* in main .*global-underflow.cpp:}}[[@LINE+3]] - // CHECK: {{0x.* is located 4 bytes to the left of global variable}} + // CHECK: {{0x.* is located 4 bytes before global variable}} // CHECK: {{.*YYY.* of size 12}} int res = YYY[-1]; return res; diff --git a/compiler-rt/test/asan/TestCases/heap-overflow.cpp b/compiler-rt/test/asan/TestCases/heap-overflow.cpp --- a/compiler-rt/test/asan/TestCases/heap-overflow.cpp +++ b/compiler-rt/test/asan/TestCases/heap-overflow.cpp @@ -15,7 +15,7 @@ int res = x[argc * 10]; // BOOOM // CHECK: {{READ of size 1 at 0x.* thread T0}} // CHECK: {{ #0 0x.* in main .*heap-overflow.cpp:}}[[@LINE-2]] - // CHECK: {{0x.* is located 0 bytes to the right of 10-byte region}} + // CHECK: {{0x.* is located 0 bytes after 10-byte region}} // CHECK: {{allocated by thread T0 here:}} // CHECK: {{ #0 0x.* in .*malloc}} diff --git a/compiler-rt/test/asan/TestCases/huge_negative_hea_oob.cpp b/compiler-rt/test/asan/TestCases/huge_negative_hea_oob.cpp --- a/compiler-rt/test/asan/TestCases/huge_negative_hea_oob.cpp +++ b/compiler-rt/test/asan/TestCases/huge_negative_hea_oob.cpp @@ -1,13 +1,13 @@ // RUN: %clangxx_asan %s -o %t && not %run %t 2>&1 | FileCheck %s // RUN: %clangxx_asan -O %s -o %t && not %run %t 2>&1 | FileCheck %s -// Check that we can find huge buffer overflows to the left. +// Check that we can find huge buffer overflows before. #include #include int main(int argc, char **argv) { char *x = (char*)malloc(1 << 20); memset(x, 0, 10); int res = x[-argc * 4000]; // BOOOM - // CHECK: is located 4000 bytes to the left of + // CHECK: is located 4000 bytes before free(x); return res; } diff --git a/compiler-rt/test/asan/TestCases/large_func_test.cpp b/compiler-rt/test/asan/TestCases/large_func_test.cpp --- a/compiler-rt/test/asan/TestCases/large_func_test.cpp +++ b/compiler-rt/test/asan/TestCases/large_func_test.cpp @@ -46,7 +46,7 @@ int *x = new int[100]; LargeFunction(x, argc - 1); // CHECK: {{ #1 0x.* in main .*large_func_test.cpp:}}[[@LINE-1]] - // CHECK: {{0x.* is located 12 bytes to the right of 400-byte region}} + // CHECK: {{0x.* is located 12 bytes after 400-byte region}} // CHECK: {{allocated by thread T0 here:}} // CHECK-Linux: {{ #0 0x.* in operator new}} // CHECK-SunOS: {{ #0 0x.* in operator new}} diff --git a/compiler-rt/test/asan/TestCases/load_and_store_n.cpp b/compiler-rt/test/asan/TestCases/load_and_store_n.cpp --- a/compiler-rt/test/asan/TestCases/load_and_store_n.cpp +++ b/compiler-rt/test/asan/TestCases/load_and_store_n.cpp @@ -19,10 +19,10 @@ // RUN: not %run %t D 2>&1 | FileCheck %s --check-prefix=CHECK_1_BYTES // CHECK_0_BYTES: ERROR: AddressSanitizer: global-buffer-overflow on address [[ADDR:.*]] at -// CHECK_0_BYTES: [[ADDR]] is located 0 bytes to the right +// CHECK_0_BYTES: [[ADDR]] is located 0 bytes after // CHECK_1_BYTES: ERROR: AddressSanitizer: global-buffer-overflow on address [[ADDR:.*]] at -// CHECK_1_BYTES: [[ADDR]] is located 1 bytes to the right +// CHECK_1_BYTES: [[ADDR]] is located 1 bytes after #include diff --git a/compiler-rt/test/asan/TestCases/partial_right.cpp b/compiler-rt/test/asan/TestCases/partial_right.cpp --- a/compiler-rt/test/asan/TestCases/partial_right.cpp +++ b/compiler-rt/test/asan/TestCases/partial_right.cpp @@ -8,6 +8,6 @@ volatile int *x = (int*)malloc(2*sizeof(int) + 2); int res = x[2]; // BOOOM // CHECK: {{READ of size 4 at 0x.* thread T0}} - // CHECK: [[ADDR:0x[01-9a-fa-f]+]] is located 0 bytes to the right of {{.*}}-byte region [{{.*}},{{.*}}[[ADDR]]) + // CHECK: [[ADDR:0x[01-9a-fa-f]+]] is located 0 bytes after {{.*}}-byte region [{{.*}},{{.*}}[[ADDR]]) return res; } diff --git a/compiler-rt/test/asan/TestCases/poison_partial.cpp b/compiler-rt/test/asan/TestCases/poison_partial.cpp --- a/compiler-rt/test/asan/TestCases/poison_partial.cpp +++ b/compiler-rt/test/asan/TestCases/poison_partial.cpp @@ -16,4 +16,4 @@ int *y = (int*)x; return y[5]; } -// CHECK: 0 bytes to the right +// CHECK: 0 bytes after diff --git a/compiler-rt/test/asan/TestCases/strncpy-overflow.cpp b/compiler-rt/test/asan/TestCases/strncpy-overflow.cpp --- a/compiler-rt/test/asan/TestCases/strncpy-overflow.cpp +++ b/compiler-rt/test/asan/TestCases/strncpy-overflow.cpp @@ -30,7 +30,7 @@ // CHECK: {{WRITE of size 10 at 0x.* thread T0}} // CHECK: {{ #0 0x.* in .*strncpy}} // CHECK: {{ #1 0x.* in main .*strncpy-overflow.cpp:}}[[@LINE-3]] - // CHECK: {{0x.* is located 0 bytes to the right of 9-byte region}} + // CHECK: {{0x.* is located 0 bytes after 9-byte region}} // CHECK: {{allocated by thread T0 here:}} // CHECK: {{ #0 0x.* in .*malloc}} // CHECK: {{ #1 0x.* in main .*strncpy-overflow.cpp:}}[[@LINE-8]] diff --git a/compiler-rt/test/asan/TestCases/unaligned_loads_and_stores.cpp b/compiler-rt/test/asan/TestCases/unaligned_loads_and_stores.cpp --- a/compiler-rt/test/asan/TestCases/unaligned_loads_and_stores.cpp +++ b/compiler-rt/test/asan/TestCases/unaligned_loads_and_stores.cpp @@ -24,7 +24,7 @@ case 'A': res = __sanitizer_unaligned_load16(x + 15); break; // CHECK-A ERROR: AddressSanitizer: heap-buffer-overflow on address // CHECK-A: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-2]] -// CHECK-A: is located 0 bytes to the right of 16-byte region +// CHECK-A: is located 0 bytes after 16-byte region case 'B': res = __sanitizer_unaligned_load32(x + 14); break; // CHECK-B: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]] case 'C': res = __sanitizer_unaligned_load32(x + 13); break; @@ -37,7 +37,7 @@ case 'K': __sanitizer_unaligned_store16(x + 15, 0); break; // CHECK-K ERROR: AddressSanitizer: heap-buffer-overflow on address // CHECK-K: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-2]] -// CHECK-K: is located 0 bytes to the right of 16-byte region +// CHECK-K: is located 0 bytes after 16-byte region case 'L': __sanitizer_unaligned_store32(x + 15, 0); break; // CHECK-L: main{{.*}}unaligned_loads_and_stores.cpp:[[@LINE-1]] case 'M': __sanitizer_unaligned_store32(x + 13, 0); break;