diff options
| author | Kostya Kortchinsky <kostyak@google.com> | 2016-09-30 19:57:21 +0000 |
|---|---|---|
| committer | Kostya Kortchinsky <kostyak@google.com> | 2016-09-30 19:57:21 +0000 |
| commit | ada27614074f52ffdecbdb8c493fb512105c594f (patch) | |
| tree | 04a917e3b08a12ff0cbd78278a44acf44c2704f1 /compiler-rt/lib/scudo/scudo_allocator.cpp | |
| parent | 7a406e78b3b67a7f5cd694f0cdcce1a23216bca1 (diff) | |
| download | bcm5719-llvm-ada27614074f52ffdecbdb8c493fb512105c594f.tar.gz bcm5719-llvm-ada27614074f52ffdecbdb8c493fb512105c594f.zip | |
[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
llvm-svn: 282913
Diffstat (limited to 'compiler-rt/lib/scudo/scudo_allocator.cpp')
| -rw-r--r-- | compiler-rt/lib/scudo/scudo_allocator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler-rt/lib/scudo/scudo_allocator.cpp b/compiler-rt/lib/scudo/scudo_allocator.cpp index 7dd400e4b8c..9b86cfdbe47 100644 --- a/compiler-rt/lib/scudo/scudo_allocator.cpp +++ b/compiler-rt/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; }; |

