aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/lib/asan/asan_report.cc2
-rw-r--r--compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc3
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/asan_report.cc b/compiler-rt/lib/asan/asan_report.cc
index 6e21762..a09df39 100644
--- a/compiler-rt/lib/asan/asan_report.cc
+++ b/compiler-rt/lib/asan/asan_report.cc
@@ -153,7 +153,7 @@ static void PrintShadowMemoryForAddress(uptr addr) {
uptr shadow_addr = MemToShadow(addr);
const uptr n_bytes_per_row = 16;
uptr aligned_shadow = shadow_addr & ~(n_bytes_per_row - 1);
- InternalScopedString str(4096);
+ InternalScopedString str(4096 * 8);
str.append("Shadow bytes around the buggy address:\n");
for (int i = -5; i <= 5; i++) {
const char *prefix = (i == 0) ? "=>" : " ";
diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc
index 84ba479..4f31422 100644
--- a/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc
+++ b/compiler-rt/lib/asan/lit_tests/TestCases/use-after-free.cc
@@ -28,4 +28,7 @@ int main() {
// CHECK-Darwin: {{ #0 0x.* in wrap_malloc.*}}
// CHECK-Darwin: {{ #1 0x.* in main .*use-after-free.cc:8}}
+ // CHECK: Shadow byte legend (one shadow byte represents 8 application bytes):
+ // CHECK: Global redzone:
+ // CHECK: ASan internal:
}