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

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 16:01:33 PST 2018


eugenis added a comment.

Users will hate these reports.
LGTM with comments



================
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) {
----------------
There is a check like this in TaggedSize.
Maybe check that tail_size is <= shadow granule instead.


================
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++)
----------------
This will break output into multiple lines in syslog. Needs buffering, same as shadow map printing.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D54656





More information about the llvm-commits mailing list