[PATCH] D10944: [asan] Fix an OS X startup crash when an empty section is present

Alexey Samsonov vonosmas at gmail.com
Mon Jul 6 09:40:39 PDT 2015


================
Comment at: lib/sanitizer_common/sanitizer_posix.cc:274
@@ -273,3 +273,3 @@
     CHECK_NE(0, end);
-    if (!IntervalsAreSeparate(start, end - 1, range_start, range_end))
+    if (!IntervalsAreSeparate(start, end, range_start, range_end))
       return false;
----------------
This is incorrect. `IntervalsAreSeparate` and `MemoryRangeIsAvailable` assume that start and end are inclusive (just audit its code and uses).
You need a special case for zero-size interval.


http://reviews.llvm.org/D10944







More information about the llvm-commits mailing list