[PATCH] D53789: [hwasan] optionally right-align heap allocations
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 15 15:08:31 PST 2018
eugenis added inline comments.
================
Comment at: lib/hwasan/hwasan_allocator.cc:92
+ switch (flags()->malloc_align_right) {
+ case 1:
+ right_align_mode = kRightAlignSometimes;
----------------
CHECK that the flag has a valid value
================
Comment at: lib/hwasan/hwasan_allocator.cc:272
Metadata *b = (Metadata *)allocator.GetMetaData(untagged_ptr);
+ if (beg != untagged_ptr && !b->right_aligned) return 0;
return b->requested_size;
----------------
if right_aligned, check that it is not more than one granule apart
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D53789
More information about the llvm-commits
mailing list