[compiler-rt] r226913 - [sanitizer] Fix an edge case in MemoryRangeIsAvailable.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Fri Jan 23 07:14:28 PST 2015
Author: eugenis
Date: Fri Jan 23 09:14:27 2015
New Revision: 226913
URL: http://llvm.org/viewvc/llvm-project?rev=226913&view=rev
Log:
[sanitizer] Fix an edge case in MemoryRangeIsAvailable.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc?rev=226913&r1=226912&r2=226913&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_posix.cc Fri Jan 23 09:14:27 2015
@@ -237,7 +237,8 @@ bool MemoryRangeIsAvailable(uptr range_s
while (proc_maps.Next(&start, &end,
/*offset*/0, /*filename*/0, /*filename_size*/0,
/*protection*/0)) {
- if (!IntervalsAreSeparate(start, end, range_start, range_end))
+ CHECK_NE(0, end);
+ if (!IntervalsAreSeparate(start, end - 1, range_start, range_end))
return false;
}
return true;
More information about the llvm-commits
mailing list