summaryrefslogtreecommitdiff
path: root/lib/scudo/scudo_allocator.cpp
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2016-09-30 19:57:21 +0000
committerKostya Kortchinsky <kostyak@google.com>2016-09-30 19:57:21 +0000
commita1e8a25ea112b6eac0120902ae9395fa27e6b231 (patch)
tree34220af90a2633fd3267197c73d4ae4b08ef4fe1 /lib/scudo/scudo_allocator.cpp
parent2d5820689c64331e9d4c1115d2630df45899b597 (diff)
[scudo] Fix an edge case in the secondary allocator
Summary: s/CHECK_LT/CHECK_LE/ in the secondary allocator, as under certain circumstances Ptr + Size can be equal to MapEnd. This edge case was not found by the current tests, so those were extended to be able to catch that. Reviewers: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D25101 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/scudo/scudo_allocator.cpp')
-rw-r--r--lib/scudo/scudo_allocator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/scudo/scudo_allocator.cpp b/lib/scudo/scudo_allocator.cpp
index 7dd400e4b..9b86cfdbe 100644
--- a/lib/scudo/scudo_allocator.cpp
+++ b/lib/scudo/scudo_allocator.cpp
@@ -81,9 +81,9 @@ struct UnpackedHeader {
u8 Unused_0_ : 4;
// 2nd 8 bytes
u64 Offset : 20; // Offset from the beginning of the backend
- // allocation to the beginning chunk itself, in
- // multiples of MinAlignment. See comment about its
- // maximum value and test in init().
+ // allocation to the beginning of the chunk itself,
+ // in multiples of MinAlignment. See comment about
+ // its maximum value and test in init().
u64 Unused_1_ : 28;
u16 Salt : 16;
};