[PATCH] D63908: hwasan: Improve precision of checks using short granule tags.

Peter Collingbourne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 11:33:52 PDT 2019


pcc added inline comments.


================
Comment at: compiler-rt/lib/hwasan/hwasan_allocator.cpp:159
                     ? (t ? t->GenerateRandomTag() : kFallbackAllocTag)
                     : 0;
+    uptr tag_size = orig_size ? orig_size : 1;
----------------
eugenis wrote:
> When !(flags()->tag_in_malloc && malloc_bisect(stack, orig_size)), the tail tag should be 0 as well.
It was already being set to 0 on line 167. You mean that the tag in shadow memory should be 0, right? Makes sense, done.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63908/new/

https://reviews.llvm.org/D63908





More information about the cfe-commits mailing list