[PATCH] D54656: [hwasan] implement free_checks_tail_magic=1

Kostya Serebryany via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 16:15:26 PST 2018


kcc added a comment.

Yep. We ourselves will hate these reports. Still, better than nothing.



================
Comment at: lib/hwasan/hwasan_allocator.cc:220
+  uptr tagged_size = TaggedSize(orig_size);
+  CHECK_GE(tagged_size, orig_size);
+  if (flags()->free_checks_tail_magic && !meta->right_aligned) {
----------------
eugenis wrote:
> There is a check like this in TaggedSize.
> Maybe check that tail_size is <= shadow granule instead.
done


================
Comment at: lib/hwasan/hwasan_report.cc:350
+  for (uptr i = 0; i < kShadowAlignment - tail_size; i++)
+    Printf(".. ");
+  for (uptr i = 0; i < tail_size; i++)
----------------
eugenis wrote:
> This will break output into multiple lines in syslog. Needs buffering, same as shadow map printing.
done


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D54656





More information about the llvm-commits mailing list