[sanitizer] Fix an edge case in MemoryRangeIsAvailable.

llvm-svn: 226913
This commit is contained in:
Evgeniy Stepanov 2015-01-23 15:14:27 +00:00
parent e94b7c24c8
commit d486e09d8e
1 changed files with 2 additions and 1 deletions

View File

@ -237,7 +237,8 @@ bool MemoryRangeIsAvailable(uptr range_start, uptr range_end) {
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;