[PATCH] D27061: [asan] Avoid duplicate and redundant poisoning checks in __sanitizer_contiguous_container_find_bad_address
Evgeniy Stepanov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 23 14:05:40 PST 2016
eugenis added inline comments.
================
Comment at: lib/asan/asan_poisoning.cc:423
return reinterpret_cast<const void *>(i);
for (uptr i = r2_beg; i < mid; i++)
if (AddressIsPoisoned(i))
----------------
vitalybuka wrote:
> Could you please combine these
> for (uptr i = r2_beg; i < mid; i++)
> for (uptr i = mid; i < r2_end; i++)
>
> into
> for (uptr i = r2_beg; i < r2_end; i++)
But these loops check for opposite conditions. Now it is simply wrong: bytes after mid must be poisoned.
Repository:
rL LLVM
https://reviews.llvm.org/D27061
More information about the llvm-commits
mailing list