Corrected D27428: Do not use the alignment-rounded-up size with secondary
authorKostya Kortchinsky <kostyak@google.com>
Tue, 13 Dec 2016 19:31:54 +0000 (19:31 +0000)
committerKostya Kortchinsky <kostyak@google.com>
Tue, 13 Dec 2016 19:31:54 +0000 (19:31 +0000)
commitc74da7ce581f0c42cb92b6a186c3e005f7b159d1
treec44aa910c24ff8fe5dacfcd29cbde6f077d0e030
parent215f6e788ec828db7d7740067d27ede93497e01b
Corrected D27428: Do not use the alignment-rounded-up size with secondary

Summary:
I atually had an integer overflow on 32-bit with D27428 that didn't reproduce
locally, as the test servers would manage allocate addresses in the 0xffffxxxx
range, which led to some issues when rounding addresses.

At this point, I feel that Scudo could benefit from having its own combined
allocator, as we don't get any benefit from the current one, but have to work
around some hurdles (alignment checks, rounding up that is no longer needed,
extraneous code).

Reviewers: kcc, alekseyshl

Subscribers: llvm-commits, kubabrecka

Differential Revision: https://reviews.llvm.org/D27681

llvm-svn: 289572
compiler-rt/lib/sanitizer_common/sanitizer_allocator_combined.h
compiler-rt/lib/scudo/scudo_allocator.cpp
compiler-rt/lib/scudo/scudo_allocator_secondary.h