forked from OSchip/llvm-project
[asan] increase the buffer size for printing asan legend, add a test for legend
llvm-svn: 200387
This commit is contained in:
parent
cda06acd31
commit
336d97146a
|
@ -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) ? "=>" : " ";
|
||||
|
|
|
@ -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:
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue