[PATCH] D27061: [asan] Avoid duplicate and redundant poisoning checks in __sanitizer_contiguous_container_find_bad_address

Maxim Ostapenko via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 00:31:37 PST 2016


m.ostapenko added inline comments.


================
Comment at: lib/asan/asan_poisoning.cc:416
+  uptr r1_end = Min(beg + kMaxRangeToCheck, mid);
+  uptr r2_beg = Max(r1_end, mid - kMaxRangeToCheck/2);
+  uptr r2_end = Min(end, mid + kMaxRangeToCheck/2);
----------------
Why do you need all these changes (416, 417, 418)? If I read the code correctly, originally ASan checks bytes around **beg**, **mid** and **end**. What's incorrect here? Overlapping of memory ranges isn't a big deal here IMHO.


Repository:
  rL LLVM

https://reviews.llvm.org/D27061





More information about the llvm-commits mailing list