diff options
author | Sergey Matveev <earthdok@google.com> | 2013-05-16 12:58:34 +0000 |
---|---|---|
committer | Sergey Matveev <earthdok@google.com> | 2013-05-16 12:58:34 +0000 |
commit | f14ef72c52673c8c37c95b07fcc79631a10d7772 (patch) | |
tree | 4b37f3d8bb35f9e56b74d45cd89d33ac02126fa8 /lib/sanitizer_common/sanitizer_allocator.h | |
parent | c7014ed50a8aecac83ab7767a76efe8a04cea680 (diff) |
[sanitizer] Fix the region overflow condition in SanitizerAllocator64::PopulateFreeList().
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@182002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_allocator.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_allocator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_allocator.h b/lib/sanitizer_common/sanitizer_allocator.h index b93de9fcf..1e9de4496 100644 --- a/lib/sanitizer_common/sanitizer_allocator.h +++ b/lib/sanitizer_common/sanitizer_allocator.h @@ -535,7 +535,7 @@ class SizeClassAllocator64 { region->mapped_meta += map_size; } CHECK_LE(region->allocated_meta, region->mapped_meta); - if (region->allocated_user + region->allocated_meta > kRegionSize) { + if (region->mapped_user + region->mapped_meta > kRegionSize) { Printf("%s: Out of memory. Dying. ", SanitizerToolName); Printf("The process has exhausted %zuMB for size class %zu.\n", kRegionSize / 1024 / 1024, size); |